Commit 2b2a89d
committed
auto merge of #10447 : alexcrichton/rust/flaky-time-test, r=catamorphism
This test was failing periodically on windows and other platforms, and in
debugging the issue locally I've found that the previous test was failing
at the assertion `ns0 <= ns1`. Upon inspecting the values, the two numbers were
very close to one another, but off by a little bit.
I believe that this is because `precise_time_s` goes from `u64` -> `f64` and
then we go again back to `u64` for the assertion. This conversion is a lossy one
that's not always guaranteed to succeed, so instead I've changed the test to
only compare against u64 instances.1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
1009 | | - | |
1010 | 1008 | | |
1011 | 1009 | | |
1012 | | - | |
1013 | | - | |
1014 | 1010 | | |
1015 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1016 | 1015 | | |
1017 | 1016 | | |
1018 | 1017 | | |
1019 | | - | |
| 1018 | + | |
1020 | 1019 | | |
1021 | 1020 | | |
1022 | 1021 | | |
| |||
0 commit comments