chungen0126 commented on code in PR #6573:
URL: https://github.com/apache/ozone/pull/6573#discussion_r1593097179


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStream.java:
##########
@@ -305,24 +305,24 @@ void testWriteExactlyFlushSize(boolean flushDelay) throws 
Exception {
       assertEquals(1, keyOutputStream.getStreamEntries().size());
       // The previously written data is equal to flushSize, so no action is
       // triggered when execute flush, if flushDelay is enabled.
-      assertEquals(pendingWriteChunkCount + (flushDelay ? 2 : 0),
-          metrics.getPendingContainerOpCountMetrics(WriteChunk));
-      assertEquals(pendingPutBlockCount + (flushDelay ? 1 : 0),
-          metrics.getPendingContainerOpCountMetrics(PutBlock));
+      if (!flushDelay) {

Review Comment:
   @adoroszlai I think the failures are not caused by 
[HDDS-10384](https://issues.apache.org/jira/browse/HDDS-10384). I run 10x30 
iterations without 
[HDDS-10384](https://issues.apache.org/jira/browse/HDDS-10384), and it failed 
in my [test](https://github.com/chungen0126/ozone/actions/runs/8974559632).
   I think the failures is due to that the `WriteChunk` and `PutBlock` 
completed before the assertion. One way to reproduce the failure is to add a 
some sleep after `write()`. 
   In `testWriteExactlyFlushSize`, there is no reason that `WriteChunk` and 
`PutBlock` won't complete before the assertion. 
   In `testWriteMoreThanFlushSize `, I think a flush is necessary to for the 
test. Also I add comments for the test.



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

Reply via email to