HBASE-9723: TestAsyncProcess#testFailAndSuccess & testThreadCreation are flaky on SUSE
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1530732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7709eb393a
commit
a4a73db932
|
@ -109,6 +109,13 @@ public class TestAsyncProcess {
|
|||
@Override
|
||||
public MultiResponse callWithoutRetries( RetryingCallable<MultiResponse> callable)
|
||||
throws IOException, RuntimeException {
|
||||
try {
|
||||
// sleep one second in order for threadpool to start another thread instead of reusing
|
||||
// existing one.
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
// ignore error
|
||||
}
|
||||
return mr;
|
||||
}
|
||||
};
|
||||
|
@ -382,6 +389,8 @@ public class TestAsyncProcess {
|
|||
while (!ap.hasError()) {
|
||||
Thread.sleep(1);
|
||||
}
|
||||
ap.waitUntilDone();
|
||||
|
||||
Assert.assertEquals(mcb.successCalled.get(), 2);
|
||||
Assert.assertEquals(mcb.retriableFailure.get(), 2);
|
||||
Assert.assertEquals(mcb.failureCalled.get(), 1);
|
||||
|
|
Loading…
Reference in New Issue