Skip to content

Commit

Permalink
[misc] test correction for failover
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Nov 6, 2024
1 parent 9c2db3b commit 472581d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/test/java/org/mariadb/jdbc/integration/MultiHostTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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")) {
Expand Down

0 comments on commit 472581d

Please sign in to comment.