HBASE-22207 Fix flakey TestAssignmentManager.testAssignSocketTimeout

This commit is contained in:
Duo Zhang 2019-04-11 16:09:49 +08:00 committed by zhangduo
parent 69e3a4eb32
commit df255f639d
1 changed files with 3 additions and 1 deletions

View File

@ -92,7 +92,9 @@ public class TestAssignmentManager extends TestAssignmentManagerBase {
rsDispatcher.setMockRsExecutor(new SocketTimeoutRsExecutor(20)); rsDispatcher.setMockRsExecutor(new SocketTimeoutRsExecutor(20));
waitOnFuture(submitProcedure(createAssignProcedure(hri))); waitOnFuture(submitProcedure(createAssignProcedure(hri)));
assertEquals(assignSubmittedCount + 1, assignProcMetrics.getSubmittedCounter().getCount()); // we crashed a rs, so it is possible that there are other regions on the rs which will also be
// reassigned, so here we just assert greater than, not the exact number.
assertTrue(assignProcMetrics.getSubmittedCounter().getCount() > assignSubmittedCount);
assertEquals(assignFailedCount, assignProcMetrics.getFailedCounter().getCount()); assertEquals(assignFailedCount, assignProcMetrics.getFailedCounter().getCount());
} }