HBASE-23658 Fix flaky TestSnapshotFromMaster (#998)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Guanghao Zhang 2020-01-09 14:38:52 +08:00 committed by GitHub
parent 9a2a799c96
commit fbf660c96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -18,7 +18,6 @@
package org.apache.hadoop.hbase.master.cleaner;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@ -545,8 +544,6 @@ public class TestSnapshotFromMaster {
snapshotName, TABLE_NAME, SnapshotType.FLUSH));
Waiter.waitFor(UTIL.getConfiguration(), 10 * 1000L, 200L,
() -> UTIL.getAdmin().listSnapshots(Pattern.compile(snapshotName)).size() == 1);
assertTrue(master.getSnapshotManager().isTakingAnySnapshot());
future.get();
assertFalse(master.getSnapshotManager().isTakingAnySnapshot());
UTIL.waitFor(30000, () -> !master.getSnapshotManager().isTakingAnySnapshot());
}
}