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:
tedyu 2016-08-31 02:05:12 -07:00
parent 1da0a48f6b
commit c536c85116
1 changed files with 6 additions and 6 deletions

View File

@ -552,12 +552,12 @@ public class TestAsyncProcess {
public void testSubmitRandomSizeRequest() throws Exception {
Random rn = new Random();
final long limit = 10 * 1024 * 1024;
for (int count = 0; count != 2; ++count) {
long maxHeapSizePerRequest = Math.max(1, (Math.abs(rn.nextLong()) % limit));
long putsHeapSize = Math.max(1, (Math.abs(rn.nextLong()) % limit));
LOG.info("[testSubmitRandomSizeRequest] maxHeapSizePerRequest=" + maxHeapSizePerRequest + ", putsHeapSize=" + putsHeapSize);
doSubmitRequest(maxHeapSizePerRequest, putsHeapSize);
}
final int requestCount = 1 + (int) (rn.nextDouble() * 3);
long putsHeapSize = Math.abs(rn.nextLong()) % limit;
long maxHeapSizePerRequest = putsHeapSize / requestCount;
LOG.info("[testSubmitRandomSizeRequest] maxHeapSizePerRequest=" + maxHeapSizePerRequest +
", putsHeapSize=" + putsHeapSize);
doSubmitRequest(maxHeapSizePerRequest, putsHeapSize);
}
@Test