loosened exponential delay test

This commit is contained in:
Adrian Cole 2011-01-23 17:30:41 -08:00
parent 0b2994a155
commit ade9fa6119
1 changed files with 2 additions and 2 deletions

View File

@ -86,13 +86,13 @@ public class BackoffLimitedRetryHandlerTest {
handler.imposeBackoffExponentialDelay(4, "TEST FAILURE: 4");
elapsedTime = (System.nanoTime() - startTime) / 1000000;
assert (elapsedTime >= 799) : elapsedTime;
assertTrue(elapsedTime < 800 + acceptableDelay);
assertTrue(elapsedTime < 800 + acceptableDelay * 2);
startTime = System.nanoTime();
handler.imposeBackoffExponentialDelay(5, "TEST FAILURE: 5");
elapsedTime = (System.nanoTime() - startTime) / 1000000;
assert (elapsedTime >= 1249) : elapsedTime;
assertTrue(elapsedTime < 1250 + acceptableDelay);
assertTrue(elapsedTime < 1250 + acceptableDelay * 2);
}
TransformingHttpCommandExecutorServiceImpl executorService;