You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/sage/parallel/map_reduce.py: reduce test dependency on CPU speed
The test we have for start_workers() is doing a bit more than
that. It's starting two threads that each print something, sleep for a
bit, and then print something else. To check the expected output, we
are basically guessing how long it will take these threads to run, and
on a very heavily-loaded machine, we can guess wrong:
File "src/sage/parallel/map_reduce.py", line 1149, in
sage.parallel.map_reduce.RESetMapReduce.start_workers
Failed example:
sleep(float(1.5))
Expected:
Finished: ...
Finished: ...
Got:
Finished: 2
(We were expecting both threads to finish within 1.5s, but only one
did.)
To make this a bit more robust, we eliminate the sleep() and
subsequent print inside of the threads. As a result, we need only make
one guess: how long it will take the threads to start. And for that we
now go overkill and wait 5s.
0 commit comments