Allow for slightly inaccurate system timers in SQSErrorRetryHandlerTest (see https://groups.google.com/d/topic/jclouds-dev/uQsqlR-CEOQ/discussion)

This commit is contained in:
Andrew Phillips 2012-09-16 18:34:55 +01:00
parent b5f60f1e70
commit 085bc43d48
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ public class SQSErrorRetryHandlerTest {
Stopwatch watch = new Stopwatch().start();
assertTrue(retry.shouldRetryRequestOnError(command, response, error));
assertEquals(command.getFailureCount(), 60);
assertTrue(watch.stop().elapsedTime(TimeUnit.MILLISECONDS) >= 100);
// allow for slightly inaccurate system timers
assertTrue(watch.stop().elapsedTime(TimeUnit.MILLISECONDS) >= 98);
}