HBASE-19942 Fix flaky TestSimpleRpcScheduler

This commit is contained in:
Guanghao Zhang 2018-02-06 17:52:05 +08:00
parent 4d24b19822
commit f481386e3e
2 changed files with 5 additions and 3 deletions

View File

@ -145,9 +145,9 @@ public abstract class RpcExecutor {
queueClass = LinkedBlockingQueue.class;
}
LOG.info("RpcExecutor " + name + " using " + callQueueType
+ " as call queue; numCallQueues=" + numCallQueues + "; maxQueueLength=" + maxQueueLength
+ "; handlerCount=" + handlerCount);
LOG.info("RpcExecutor " + this.name + " using " + this.queueClass
+ " as call queue; numCallQueues=" + this.numCallQueues + "; maxQueueLength="
+ maxQueueLength + "; handlerCount=" + this.handlerCount);
}
protected int computeNumCallQueues(final int handlerCount, final float callQueuesHandlersFactor) {

View File

@ -428,6 +428,8 @@ public class TestSimpleRpcScheduler {
schedConf.setInt(HConstants.REGION_SERVER_HANDLER_COUNT, 0);
schedConf.setInt("hbase.ipc.server.max.callqueue.length", 5);
schedConf.set(RpcExecutor.CALL_QUEUE_TYPE_CONF_KEY,
RpcExecutor.CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE);
PriorityFunction priority = mock(PriorityFunction.class);
when(priority.getPriority(any(), any(), any())).thenReturn(HConstants.NORMAL_QOS);