Skip to content

Commit

Permalink
Increase timeout for flaky test (#5305)
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke authored and squarejesse committed Aug 10, 2019
1 parent f40e21a commit 609888f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.concurrent.atomic.AtomicReference;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.testing.Flaky;
import okio.BufferedSink;
import org.junit.Before;
import org.junit.Rule;
Expand Down Expand Up @@ -286,7 +287,10 @@ public void timeoutFollowingRedirectOnNewConnection() throws Exception {
}
}

@Flaky
@Test public void noTimeout() throws Exception {
// Flaky https://github.com/square/okhttp/issues/5304

server.enqueue(new MockResponse()
.setHeadersDelay(250, TimeUnit.MILLISECONDS)
.setBody(BIG_ENOUGH_BODY));
Expand All @@ -297,7 +301,7 @@ public void timeoutFollowingRedirectOnNewConnection() throws Exception {
.build();

Call call = client.newCall(request);
call.timeout().timeout(1000, TimeUnit.MILLISECONDS);
call.timeout().timeout(2000, TimeUnit.MILLISECONDS);
Response response = call.execute();
Thread.sleep(250);
response.body().source().readUtf8();
Expand Down

0 comments on commit 609888f

Please sign in to comment.