12199: Improve race handling in busywait.
authorTom Clegg <tclegg@veritasgenetics.com>
Mon, 12 Feb 2018 22:06:13 +0000 (17:06 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Mon, 12 Feb 2018 22:06:13 +0000 (17:06 -0500)
commitde70e67d9bd06783f42ba5ab2408b5778e6573ff
tree8945df5f973ab5331d082c9d099f4e39e005e3cc
parentf35131cad37610298a6cdc52b4b213a29cb1e735
12199: Improve race handling in busywait.

The previous implementation was "call f() until it's truthy, then
assert f()". The assertion fails if f() returns truthy but then
returns falsy on the next call.

The new implementation doesn't call f() again after it returns truthy
once.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
services/nodemanager/tests/test_daemon.py