diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-04-28 10:15:21 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2021-04-28 10:15:21 +0200 |
commit | 7b3f38ea06998f42ad7e3bed428b6b2eb1271e49 (patch) | |
tree | 6a581da0b2b5e4a7784c1dc06688c817e9464984 /config/src/test | |
parent | 04a5db19b3e8ef8f27e441e3c4676b64cc223c8e (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')
-rw-r--r-- | config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java | 1 | ||||
-rw-r--r-- | config/src/test/java/com/yahoo/vespa/config/JRTConnectionPoolTest.java | 3 |
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 |