bharatviswa504 commented on a change in pull request #1238: HDDS-1921. 
TestOzoneManagerDoubleBufferWithOMResponse is flaky
URL: https://github.com/apache/hadoop/pull/1238#discussion_r311309048
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBufferWithOMResponse.java
 ##########
 @@ -345,21 +345,23 @@ public void testDoubleBuffer(int iterations, int 
bucketCount)
       }
 
       // We are doing +1 for volume transaction.
-      GenericTestUtils.waitFor(() ->
-              doubleBuffer.getFlushedTransactionCount() ==
-                  (bucketCount + 1) * iterations, 100,
-          120000);
+      long expectedTransactions = (bucketCount + 1) * iterations;
+      GenericTestUtils.waitFor(() -> lastAppliedIndex == expectedTransactions,
+          100, 120000);
 
-      Assert.assertTrue(omMetadataManager.countRowsInTable(
-          omMetadataManager.getVolumeTable()) == iterations);
+      Assert.assertEquals(expectedTransactions,
+          doubleBuffer.getFlushedTransactionCount()
+      );
 
-      Assert.assertTrue(omMetadataManager.countRowsInTable(
-          omMetadataManager.getBucketTable()) == (bucketCount) * iterations);
+      Assert.assertEquals(iterations,
+          
omMetadataManager.countRowsInTable(omMetadataManager.getVolumeTable())
+      );
 
-      Assert.assertTrue(doubleBuffer.getFlushIterations() > 0);
+      Assert.assertEquals(bucketCount * iterations,
+          
omMetadataManager.countRowsInTable(omMetadataManager.getBucketTable())
+      );
 
-      // Check lastAppliedIndex is updated correctly or not.
-      Assert.assertEquals((bucketCount + 1) * iterations, lastAppliedIndex);
 
 Review comment:
   Why this check lastAppliedIndex is removed?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to