HBASE-18292 Fixed flaky test hbase.master.locking.TestLockProcedure#testLocalMasterLockRecovery
Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
15bda5d5d4
commit
7e7917ed6d
|
@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException;
|
||||||
import org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.*;
|
import org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.*;
|
||||||
import org.apache.hadoop.hbase.testclassification.MasterTests;
|
import org.apache.hadoop.hbase.testclassification.MasterTests;
|
||||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||||
|
import org.apache.hadoop.hbase.util.Pair;
|
||||||
import org.hamcrest.core.IsInstanceOf;
|
import org.hamcrest.core.IsInstanceOf;
|
||||||
import org.hamcrest.core.StringStartsWith;
|
import org.hamcrest.core.StringStartsWith;
|
||||||
import org.junit.rules.TestRule;
|
import org.junit.rules.TestRule;
|
||||||
|
@ -74,8 +75,8 @@ public class TestLockProcedure {
|
||||||
@Rule
|
@Rule
|
||||||
public TestName testName = new TestName();
|
public TestName testName = new TestName();
|
||||||
// crank this up if this test turns out to be flaky.
|
// crank this up if this test turns out to be flaky.
|
||||||
private static final int HEARTBEAT_TIMEOUT = 1000;
|
private static final int HEARTBEAT_TIMEOUT = 2000;
|
||||||
private static final int LOCAL_LOCKS_TIMEOUT = 2000;
|
private static final int LOCAL_LOCKS_TIMEOUT = 4000;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(TestLockProcedure.class);
|
private static final Log LOG = LogFactory.getLog(TestLockProcedure.class);
|
||||||
protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
||||||
|
@ -438,9 +439,9 @@ public class TestLockProcedure {
|
||||||
Thread.sleep(250);
|
Thread.sleep(250);
|
||||||
}
|
}
|
||||||
assertEquals(true, procExec.isRunning());
|
assertEquals(true, procExec.isRunning());
|
||||||
LockProcedure proc = (LockProcedure) procExec.getProcedure(lockProc.getProcId());
|
|
||||||
assertTrue(proc == null || !proc.isLocked());
|
|
||||||
ProcedureTestingUtility.waitProcedure(procExec, lockProc.getProcId());
|
ProcedureTestingUtility.waitProcedure(procExec, lockProc.getProcId());
|
||||||
|
Pair<ProcedureInfo, Procedure> result = procExec.getResultOrProcedure(lockProc.getProcId());
|
||||||
|
assertTrue(result.getFirst() != null && !result.getFirst().isFailed());
|
||||||
ProcedureTestingUtility.assertProcNotFailed(procExec, lockProc.getProcId());
|
ProcedureTestingUtility.assertProcNotFailed(procExec, lockProc.getProcId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue