HBASE-13591 Attempt to stabilize TestHBaseFsck

This commit is contained in:
Josh Elser 2015-05-01 12:37:49 -04:00 committed by Nick Dimiduk
parent 86a5e3b4e3
commit 335a26a893
1 changed files with 6 additions and 3 deletions

View File

@ -613,7 +613,7 @@ public class TestHBaseFsck {
} }
/** /**
* This test makes sure that with 5 retries both parallel instances * This test makes sure that with 10 retries both parallel instances
* of hbck will be completed successfully. * of hbck will be completed successfully.
* *
* @throws Exception * @throws Exception
@ -627,7 +627,10 @@ public class TestHBaseFsck {
@Override @Override
public HBaseFsck call() throws Exception { public HBaseFsck call() throws Exception {
return doFsck(conf, false); // Increase retry attempts to make sure the non-active hbck doesn't get starved
Configuration c = new Configuration(conf);
c.setInt("hbase.hbck.lockfile.attempts", 10);
return doFsck(c, false);
} }
} }
service = Executors.newFixedThreadPool(2); service = Executors.newFixedThreadPool(2);
@ -635,7 +638,7 @@ public class TestHBaseFsck {
hbck2 = service.submit(new RunHbck()); hbck2 = service.submit(new RunHbck());
service.shutdown(); service.shutdown();
//wait for 15 seconds, for both hbck calls finish //wait for 15 seconds, for both hbck calls finish
service.awaitTermination(15, TimeUnit.SECONDS); service.awaitTermination(25, TimeUnit.SECONDS);
HBaseFsck h1 = hbck1.get(); HBaseFsck h1 = hbck1.get();
HBaseFsck h2 = hbck2.get(); HBaseFsck h2 = hbck2.get();
// Both should be successful // Both should be successful