From 9eb25bd5c92619257a3ffb3bbbb090a712cf226a Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 16 Mar 2016 08:04:10 -0700 Subject: [PATCH] HBASE-15360 Fix flaky TestSimpleRpcScheduler (Duo Zhang) --- .../org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java index 916037b6cfa..6454537dbe0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java @@ -354,7 +354,9 @@ public class TestSimpleRpcScheduler { schedConf.setInt("hbase.ipc.server.max.callqueue.length", 0); scheduler.onConfigurationChange(schedConf); assertFalse(scheduler.dispatch(putCallTask)); - + while (scheduler.getGeneralQueueLength() > 0) { + Threads.sleepWithoutInterrupt(100); + } schedConf.setInt("hbase.ipc.server.max.callqueue.length", 1); scheduler.onConfigurationChange(schedConf); assertTrue(scheduler.dispatch(putCallTask));