adelapena commented on a change in pull request #1342:
URL: https://github.com/apache/cassandra/pull/1342#discussion_r759320989
##########
File path: test/unit/org/apache/cassandra/utils/RecomputingSupplierTest.java
##########
@@ -93,31 +91,41 @@ public void recomputingSupplierTest() throws Throwable
lastSeen.accumulateAndGet(v, Math::max);
Assert.assertTrue(String.format("Seen %d out of
order. Last seen value %d", v, seenBeforeGet),
v >= seenBeforeGet);
-
}
-
}
catch (Throwable e)
{
thrown.set(e);
- latch.countDown();
}
}
});
}
- latch.await(10, TimeUnit.SECONDS);
-
+ Util.spinAssertEquals(true, () -> counter.get() > 1000, 10);
Review comment:
I don't really have a preference, I was just commenting about why the
latch was there. The `spinAssert` is briefer and probably easier to understand
so I guess I'd lean towards it. As for the 1k iterations, that's probably as
arbitrary as the 10 seconds, and still it doesn't prevent us from hitting the
failures mentioned below, so I guess we can keep it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]