HBASE-20476 Fix the flaky TestReplicationSmallTests unit test

This commit is contained in:
zhangduo 2018-04-26 20:46:09 +08:00
parent e6220c8b60
commit 96ed407c69
2 changed files with 3 additions and 1 deletions

View File

@ -119,6 +119,7 @@ public class SerialReplicationTestBase {
public static void setUpBeforeClass() throws Exception {
UTIL.getConfiguration().setInt("replication.source.nb.capacity", 10);
UTIL.getConfiguration().setLong("replication.sleep.before.failover", 1000);
UTIL.getConfiguration().setLong("hbase.serial.replication.waiting.ms", 100);
UTIL.startMiniCluster(3);
// disable balancer
UTIL.getAdmin().balancerSwitch(false, true);

View File

@ -87,7 +87,7 @@ public class TestReplicationBase {
protected static final int NB_ROWS_IN_BIG_BATCH =
NB_ROWS_IN_BATCH * 10;
protected static final long SLEEP_TIME = 500;
protected static final int NB_RETRIES = 10;
protected static final int NB_RETRIES = 50;
protected static final TableName tableName = TableName.valueOf("test");
protected static final byte[] famName = Bytes.toBytes("f");
@ -185,6 +185,7 @@ public class TestReplicationBase {
conf1.setInt("replication.source.maxretriesmultiplier", 10);
conf1.setFloat("replication.source.ratio", 1.0f);
conf1.setBoolean("replication.source.eof.autorecovery", true);
conf1.setLong("hbase.serial.replication.waiting.ms", 100);
utility1 = new HBaseTestingUtility(conf1);
utility1.startMiniZKCluster();