aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/test/java
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2021-04-28 10:15:21 +0200
committerHarald Musum <musum@verizonmedia.com>2021-04-28 10:15:21 +0200
commit7b3f38ea06998f42ad7e3bed428b6b2eb1271e49 (patch)
tree6a581da0b2b5e4a7784c1dc06688c817e9464984 /config/src/test/java
parent04a5db19b3e8ef8f27e441e3c4676b64cc223c8e (diff)
Simplify code
Add equals and hashcode to JRTConnection Just switch to a new one if current connection is failing Removes need for last sucess, error etc. and healthy status
Diffstat (limited to 'config/src/test/java')
-rw-r--r--config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java1
-rw-r--r--config/src/test/java/com/yahoo/vespa/config/JRTConnectionPoolTest.java3
2 files changed, 1 insertions, 3 deletions
diff --git a/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java b/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java
index 4211345dff7..1b56e9290b2 100644
--- a/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java
+++ b/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java
@@ -277,7 +277,6 @@ public class JRTConfigRequesterTest {
} catch (InterruptedException e) {
e.printStackTrace();
}
- assertTrue(connection.getNumberOfFailovers() >= 1);
}
private JRTConfigSubscription<SimpletypesConfig> createSubscription(ConfigSubscriber subscriber, TimingValues timingValues) {
diff --git a/config/src/test/java/com/yahoo/vespa/config/JRTConnectionPoolTest.java b/config/src/test/java/com/yahoo/vespa/config/JRTConnectionPoolTest.java
index 8bd88d8958f..bfe132c9660 100644
--- a/config/src/test/java/com/yahoo/vespa/config/JRTConnectionPoolTest.java
+++ b/config/src/test/java/com/yahoo/vespa/config/JRTConnectionPoolTest.java
@@ -139,14 +139,13 @@ public class JRTConnectionPoolTest {
JRTConnection secondConnection = failAndGetNewConnection(connectionPool, firstConnection);
assertNotEquals(firstConnection, secondConnection);
- // Should change connection, , not getting first or seconds connection as new
+ // Should change connection, not getting second connection as new
JRTConnection thirdConnection = failAndGetNewConnection(connectionPool, secondConnection);
// Fail a few more times with old connection, as will happen when there are multiple subscribers
// Connection should not change
assertEquals(thirdConnection, failAndGetNewConnection(connectionPool, secondConnection));
assertEquals(thirdConnection, failAndGetNewConnection(connectionPool, secondConnection));
assertEquals(thirdConnection, failAndGetNewConnection(connectionPool, secondConnection));
- assertNotEquals(firstConnection, thirdConnection);
assertNotEquals(secondConnection, thirdConnection);
// Should change connection, not getting third connection as new