diff options
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo')
2 files changed, 1 insertions, 17 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DatabaseHandlerTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DatabaseHandlerTest.java index 7f664e65dc0..9c0a94309a5 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DatabaseHandlerTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DatabaseHandlerTest.java @@ -10,7 +10,6 @@ import org.junit.Test; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; @@ -66,22 +65,11 @@ public class DatabaseHandlerTest { } DatabaseHandler createHandler() throws Exception { - var handler = new DatabaseHandler(mockDbFactory, mockTimer, databaseAddress, 0, monitor); - handler.setConnectionEstablishmentIsAllowed(true); - return handler; + return new DatabaseHandler(mockDbFactory, mockTimer, databaseAddress, 0, monitor); } } @Test - public void can_not_connect_to_database_if_connectivity_is_not_allowed() throws Exception { - Fixture f = new Fixture(); - DatabaseHandler handler = f.createHandler(); - handler.setConnectionEstablishmentIsAllowed(false); - handler.doNextZooKeeperTask(f.createMockContext()); - assertTrue(handler.isClosed()); // No connectivity allowed yet - } - - @Test public void can_store_latest_cluster_state_bundle() throws Exception { Fixture f = new Fixture(); DatabaseHandler handler = f.createHandler(); diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyCommunicator.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyCommunicator.java index d7bca47026f..b322c62967a 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyCommunicator.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/DummyCommunicator.java @@ -154,8 +154,4 @@ public class DummyCommunicator implements Communicator, NodeLookup { return false; } - @Override - public boolean isReady() { - return true; - } } |