gemmellr commented on code in PR #4544:
URL: https://github.com/apache/activemq-artemis/pull/4544#discussion_r1262375357


##########
artemis-quorum-ri/src/test/java/org/apache/activemq/artemis/quorum/DistributedLockTest.java:
##########
@@ -222,7 +219,7 @@ public void timedTryLockFailAfterTimeout() throws 
ExecutionException, Interrupte
       final long timeoutSec = 1;
       Assert.assertFalse(manager.getDistributedLock("a").tryLock(timeoutSec, 
TimeUnit.SECONDS));
       final long elapsed = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - 
start);
-      assertThat(elapsed, greaterThanOrEqualTo(timeoutSec));
+      Assert.assertTrue(elapsed >= timeoutSec);

Review Comment:
   Yeah, I wasnt saying you needed to do them all (though it is certainly nicer 
to so you dont need to open the code to read the assertion when a test run 
fails).
   
   Its more the things where if it failed, you would only know partial 
detail...e.g if an assert was checking for a specific class and failed due to 
an unexpected class (but which one was it actually?), or a value wasnt between 
expected X and Y (but what was it?), etc. The ones where the assertion failure 
doesnt implicitly give you enough context to know what did happen, even though 
that might greatly help you figure out why what you expected didnt happen.



-- 
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]

Reply via email to