fix a test bug

This commit is contained in:
xuzha 2015-10-19 12:06:20 -07:00
parent 3910fad1d6
commit 1069ad9fad
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ public class RetryHttpInitializerWrapperTests {
@Test @Test
public void testRetryWaitTooLong() throws Exception { public void testRetryWaitTooLong() throws Exception {
int maxWait = 50; int maxWait = 10;
FailThenSuccessBackoffTransport fakeTransport = FailThenSuccessBackoffTransport fakeTransport =
new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 50); new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 50);
@ -124,7 +124,7 @@ public class RetryHttpInitializerWrapperTests {
MockSleeper oneTimeSleeper = new MockSleeper() { MockSleeper oneTimeSleeper = new MockSleeper() {
@Override @Override
public void sleep(long millis) throws InterruptedException { public void sleep(long millis) throws InterruptedException {
Thread.sleep(maxWait); Thread.sleep(maxWait * 10);
super.sleep(0); // important number, use this to get count super.sleep(0); // important number, use this to get count
} }
}; };