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


##########
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:
   I agree that Hamcrest provides better messages when assertions fail, 
although there are huge number of vague uses of `assertTrue` throughout the 
code-base. I've added messages where I thought it made sense or changed 
`assertTrue` to `assertEquals` to get an automated message which is more useful.



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