justinleet commented on a change in pull request #1554: METRON-2307: Migrate to 
JUnit5
URL: https://github.com/apache/metron/pull/1554#discussion_r347037466
 
 

 ##########
 File path: 
metron-platform/metron-common/src/test/java/org/apache/metron/common/performance/PerformanceLoggerTest.java
 ##########
 @@ -62,29 +57,29 @@ public void setup() {
   }
 
   @Test
-  public void logs_on_threshold() throws Exception {
+  public void logs_on_threshold() {
     
when(timing.getElapsed("t1")).thenReturn(111L).thenReturn(222L).thenReturn(333L);
     perfLogger.mark("t1");
     perfLogger.log("t1");
     perfLogger.log("t1");
     perfLogger.log("t1");
     verify(timing).mark("t1");
-    verify(logger, times(1)).debug(anyString(), anyObject(), eq(111L), eq(""));
+    verify(logger, times(1)).debug(any(String.class), any(), eq(111L), eq(""));
   }
 
   @Test
-  public void logs_on_threshold_with_message() throws Exception {
+  public void logs_on_threshold_with_message() {
     
when(timing.getElapsed("t1")).thenReturn(111L).thenReturn(222L).thenReturn(333L);
     perfLogger.mark("t1");
     perfLogger.log("t1", "my message");
     perfLogger.log("t1", "my message");
     perfLogger.log("t1", "my message");
     verify(timing).mark("t1");
-    verify(logger, times(1)).debug(anyString(), anyObject(), eq(111L), eq("my 
message"));
+    verify(logger, times(1)).debug(any(String.class), any(), eq(111L), eq("my 
message"));
 
 Review comment:
   I think it's leftover from dealing with mockito / hamcrest when I was 
figuring out upgrading. You're right, it can be moved to `anyString()` 
throughout.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to