test: pin awaitUntil's single predicate evaluation

The helper used to evaluate its predicate once more when leaving the loop, so
a briefly-true predicate failed with a timeout that had not elapsed. Cover
that directly instead of relying on a caller that happens to be transiently
true.
This commit is contained in:
austinried
2026-11-15 12:11:44 +00:00
parent 15f9a9f48d
commit 5a4ca71cfa
@@ -0,0 +1,11 @@
package com.subtracks
import org.junit.Test
class TestSupportTest {
@Test
fun returnsWhenThePredicateIsBrieflyTrue() {
var calls = 0
awaitUntil("the predicate is briefly true") { ++calls == 1 }
}
}