TestKernelTransaction tx = TestKernelTransaction.create().initialize();
AtomicLong t1Count = new AtomicLong();
AtomicLong t2Count = new AtomicLong();
long endTime = currentTimeMillis() + TEST_RUN_TIME_MS;
int limit = 20_000;
<BUG>Race race = new Race();
BooleanSupplier end = () -> ((t1Count.get() >= limit && t2Count.get() >= limit) || currentTimeMillis() >= endTime);

race.addContestant( until( end, () -> {
thread1Action.accept( tx );</BUG>
t1Count.incrementAndGet();

TestKernelTransaction tx = TestKernelTransaction.create().initialize();
AtomicLong t1Count = new AtomicLong();
AtomicLong t2Count = new AtomicLong();
long endTime = currentTimeMillis() + TEST_RUN_TIME_MS;
int limit = 20_000;
Race race = new Race();
race.withEndCondition(
() -> ((t1Count.get() >= limit && t2Count.get() >= limit) || currentTimeMillis() >= endTime) );
race.addContestant( () -> {
thread1Action.accept( tx );
