ayushtkn commented on a change in pull request #1579:
URL: https://github.com/apache/ozone/pull/1579#discussion_r531984470



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAMetadataOnly.java
##########
@@ -406,6 +406,7 @@ public void testOMRetryCache() throws Exception {
     Assert.assertTrue(logCapturer.getOutput().contains("created volume:"
         + volumeName));
 
+    Thread.sleep(100L);

Review comment:
       the assert true ensures, that created volume is loged once for the 
volume, then it clears the log. Then on the same request, it expects the same 
log line isn't logged again. I think the create Volume line is logged more than 
once. So, it passes assertTrue. since the line was logged atleast once, then 
clears it and the other occurrences come post clearing it, thus the failure.
   
   I was running the test, and it logged multiple time -
   ```
   2020-11-28 12:51:24,067 [OM StateMachine ApplyTransaction Thread - 0] INFO  
volume.OMVolumeCreateRequest 
(OMVolumeCreateRequest.java:validateAndUpdateCache(196)) - created 
volume:7249ac13-c180-40f8-a636-8d4eb481ca48 for user:ayushsaxena
   2020-11-28 12:51:24,067 [OM StateMachine ApplyTransaction Thread - 0] INFO  
volume.OMVolumeCreateRequest 
(OMVolumeCreateRequest.java:validateAndUpdateCache(196)) - created 
volume:7249ac13-c180-40f8-a636-8d4eb481ca48 for user:ayushsaxena
   2020-11-28 12:51:24,067 [OM StateMachine ApplyTransaction Thread - 0] INFO  
volume.OMVolumeCreateRequest 
(OMVolumeCreateRequest.java:validateAndUpdateCache(196)) - created 
volume:7249ac13-c180-40f8-a636-8d4eb481ca48 for user:ayushsaxena
   ```
   
   So chances are we cleared the log, after first occurrence.
   Do you have the logs when this test fails, Can you check this there whether 
created volume is logged multiple times, I think it is getting logged once per 
OM.(Wild Guess)




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to