You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/02/18 07:04:39 UTC

[GitHub] [hbase] infraio commented on a change in pull request #1181: HBASE-23862 Fix flaky TestSnapshotFromMaster in 1.x versions

infraio commented on a change in pull request #1181: HBASE-23862 Fix flaky TestSnapshotFromMaster in 1.x versions
URL: https://github.com/apache/hbase/pull/1181#discussion_r380489633
 
 

 ##########
 File path: hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
 ##########
 @@ -530,8 +530,11 @@ public boolean evaluate() throws Exception {
         return UTIL.getHBaseAdmin().listSnapshots(Pattern.compile(snapshotName)).size() == 1;
       }
     });
-    assertTrue(master.getSnapshotManager().isTakingAnySnapshot());
-    Thread.sleep(11 * 1000L);
-    assertFalse(master.getSnapshotManager().isTakingAnySnapshot());
+    UTIL.waitFor(30000, new Predicate<Exception>() {
+      @Override
+      public boolean evaluate() throws Exception {
+        return UTIL.getHBaseAdmin().listSnapshots(Pattern.compile(snapshotName)).size() == 1;
 
 Review comment:
    UTIL.waitFor(30000, () -> !master.getSnapshotManager().isTakingAnySnapshot());?

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


With regards,
Apache Git Services