Skip to content
Commit 7ab12ba8 authored by Simon Bowden's avatar Simon Bowden
Browse files

Fix a race condition between calculateWaitTime and actually waiting.

When the race was lost with a completion callback, the operation
being waited upon may have been de-queued by the completion callback
for immediate execution, but the thread was still proceeding with
the wait.

This caused flaky tests as the extra delay caused the thread to
take longer to complete, and the newly extended callback delay
happened to coincide with the test's wait timeout. Consequently,
the test's wait timeout is shortened slightly to make it clearer
when the issue is caused by "falling into" the OffStep callback
delay, which isn't intended to be a normal behavior.

Test: manual atest
Bug: 194408223
Change-Id: I97ec74bbc26171a4384ed9ddd7e2130fb8004b9b
parent 5528d08a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment