aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-09-30 10:07:58 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-09-30 10:38:01 +0200
commit063639fe1692980932395fc605ff968d2cea2720 (patch)
tree7a3ccfcd50cfbb216f684d3925d944c186da9db2
parent8cafeb2231528a3e8e25be52a33715d2af83f80b (diff)
fixup! Increase connection-time-to-live to 30 seconds
-rw-r--r--vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/IOThreadTest.java46
1 files changed, 23 insertions, 23 deletions
diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/IOThreadTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/IOThreadTest.java
index 240adc29197..ef90d6853b1 100644
--- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/IOThreadTest.java
+++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/IOThreadTest.java
@@ -101,36 +101,36 @@ public class IOThreadTest {
tester.send("doc1");
tester.tick(1);
- tester.clock().advance(Duration.ofSeconds(16)); // Default connection ttl is 15
+ tester.clock().advance(Duration.ofSeconds(31)); // Default connection ttl is 30
tester.tick(3);
assertEquals(1, ioThread.oldConnections().size());
assertEquals(firstConnection, ioThread.oldConnections().get(0));
assertNotSame(firstConnection, ioThread.currentConnection());
- assertEquals(16, firstConnection.lastPollTime().toEpochMilli() / 1000);
+ assertEquals(31, firstConnection.lastPollTime().toEpochMilli() / 1000);
// Check old connection poll pattern (exponential backoff)
- assertLastPollTimeWhenAdvancing(16, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(18, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(18, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(18, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(18, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(22, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
- assertLastPollTimeWhenAdvancing(30, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(31, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(33, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(33, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(33, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(33, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(37, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
+ assertLastPollTimeWhenAdvancing(45, 1, firstConnection, tester);
tester.clock().advance(Duration.ofSeconds(200));
tester.tick(1);