Make the workqueue task unit tests less flaky.

The workqueue test unit tests have to test an assertion that an
asynchronous call (via StartTask) starts _eventually_.  The
underlying Python+Linux combination provides no hard real time
guarantee on how long "eventually" will be, so we have to pick a
generous timeout, and cross our fingers.

During release builds, the builder system can be heavily loaded,
increasing task start time enough that that the originally selected
"generous" timeout wasn't always long enough, causing the test to be
flaky.

This increases the timeout dramatically.  It further changes the
wait strategy to prevent the test time for success from blowing up
on an unloaded system.

BUG=chromium:755914
TEST=run the unit tests; also test with _START_LATENCY temporarily 0

Change-Id: Id25f1214f2cae502adec672ba50f88515dac25c9
Reviewed-on: https://chromium-review.googlesource.com/617375
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed