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:
[email protected]
With regards,
Apache Git Services