Skip to content

Commit fe48fc4

Browse files
committed
[java] Stopping OkHttp from retrying after getting 408 response code. This caused duplication of page load timeout.
1 parent 157703a commit fe48fc4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

java/client/src/org/openqa/selenium/remote/internal/OkHttpClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public HttpClient createClient(URL url) {
142142
.connectionPool(pool)
143143
.followRedirects(true)
144144
.followSslRedirects(true)
145+
.retryOnConnectionFailure(false)
145146
.readTimeout(readTimeout, MILLISECONDS)
146147
.connectTimeout(connectionTimeout, MILLISECONDS);
147148

java/client/test/org/openqa/selenium/PageLoadingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToRefresh() {
461461

462462
int duration = (int) (end - start);
463463
assertThat(duration, greaterThan(2000));
464-
assertThat(duration, lessThan(5000));
464+
assertThat(duration, lessThan(4000));
465465
} finally {
466466
driver.manage().timeouts().pageLoadTimeout(300, SECONDS);
467467
}

0 commit comments

Comments
 (0)