From 472581d0523d4cd8742239061d83c43b1f869e60 Mon Sep 17 00:00:00 2001 From: rusher Date: Wed, 6 Nov 2024 12:03:04 +0100 Subject: [PATCH] [misc] test correction for failover --- .../java/org/mariadb/jdbc/integration/MultiHostTest.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/mariadb/jdbc/integration/MultiHostTest.java b/src/test/java/org/mariadb/jdbc/integration/MultiHostTest.java index 7428e4cb0..f7e176037 100644 --- a/src/test/java/org/mariadb/jdbc/integration/MultiHostTest.java +++ b/src/test/java/org/mariadb/jdbc/integration/MultiHostTest.java @@ -47,12 +47,7 @@ public void failoverReadonlyToMaster() throws Exception { @Test public void ensureReadOnlyOnReplica() throws Exception { // mariadb1.example.com, mariadb2.example.com and mariadb3.example.com DNS alias must be defined - Assumptions.assumeTrue( - !isWindows() - && !"maxscale".equals(System.getenv("srv")) - && !"skysql".equals(System.getenv("srv")) - && !"skysql-ha".equals(System.getenv("srv")) - && !isXpand()); + Assumptions.assumeFalse("maxscale".equals(System.getenv("srv"))); Configuration conf = Configuration.parse(mDefUrl); HostAddress hostAddress = conf.addresses().get(0); @@ -74,7 +69,7 @@ public void ensureReadOnlyOnReplica() throws Exception { (Connection) DriverManager.getConnection( url + "&waitReconnectTimeout=30&deniedListTimeout=300")) { - assertTrue(con.__test_host().contains("primary")); + assertFalse(con.__test_host().contains("replica")); con.setReadOnly(true); assertTrue(con.__test_host().contains("replica")); if (con.__test_host().contains("mariadb2")) {