HBASE-16515 AsyncProcess has incorrent count of tasks if the backoff policy is enabled - addendum fixes timeout of TestAsyncProcess#testSubmitRandomSizeRequest (Chiaping Tsai)
This commit is contained in:
parent
1da0a48f6b
commit
c536c85116
|
@ -552,12 +552,12 @@ public class TestAsyncProcess {
|
||||||
public void testSubmitRandomSizeRequest() throws Exception {
|
public void testSubmitRandomSizeRequest() throws Exception {
|
||||||
Random rn = new Random();
|
Random rn = new Random();
|
||||||
final long limit = 10 * 1024 * 1024;
|
final long limit = 10 * 1024 * 1024;
|
||||||
for (int count = 0; count != 2; ++count) {
|
final int requestCount = 1 + (int) (rn.nextDouble() * 3);
|
||||||
long maxHeapSizePerRequest = Math.max(1, (Math.abs(rn.nextLong()) % limit));
|
long putsHeapSize = Math.abs(rn.nextLong()) % limit;
|
||||||
long putsHeapSize = Math.max(1, (Math.abs(rn.nextLong()) % limit));
|
long maxHeapSizePerRequest = putsHeapSize / requestCount;
|
||||||
LOG.info("[testSubmitRandomSizeRequest] maxHeapSizePerRequest=" + maxHeapSizePerRequest + ", putsHeapSize=" + putsHeapSize);
|
LOG.info("[testSubmitRandomSizeRequest] maxHeapSizePerRequest=" + maxHeapSizePerRequest +
|
||||||
doSubmitRequest(maxHeapSizePerRequest, putsHeapSize);
|
", putsHeapSize=" + putsHeapSize);
|
||||||
}
|
doSubmitRequest(maxHeapSizePerRequest, putsHeapSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue