From 3432c20b905696b3ece9fbd72659273a3ab78775 Mon Sep 17 00:00:00 2001 From: Thomas Segismont Date: Thu, 9 Nov 2023 16:59:28 +0100 Subject: [PATCH] Setup ProxySQL before each test (#1375) Related to #1374 This is an attempt to avoid connectivity failures. Signed-off-by: Thomas Segismont --- .../vertx/mysqlclient/ProxySQLBatchInsertExceptionTest.java | 6 +++--- .../io/vertx/mysqlclient/tck/ProxySQLPreparedBatchTest.java | 6 +++--- .../io/vertx/mysqlclient/tck/ProxySQLPreparedQueryTest.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/ProxySQLBatchInsertExceptionTest.java b/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/ProxySQLBatchInsertExceptionTest.java index 43afe5eee..eca3395b1 100644 --- a/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/ProxySQLBatchInsertExceptionTest.java +++ b/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/ProxySQLBatchInsertExceptionTest.java @@ -13,14 +13,14 @@ import io.vertx.ext.unit.junit.VertxUnitRunner; import io.vertx.mysqlclient.junit.ProxySQLRule; -import org.junit.ClassRule; +import org.junit.Rule; import org.junit.runner.RunWith; @RunWith(VertxUnitRunner.class) public class ProxySQLBatchInsertExceptionTest extends MySQLBatchInsertExceptionTestBase { - @ClassRule - public static ProxySQLRule proxySql = new ProxySQLRule(rule); + @Rule + public ProxySQLRule proxySql = new ProxySQLRule(rule); @Override protected MySQLConnectOptions createOptions() { diff --git a/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedBatchTest.java b/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedBatchTest.java index f7f0ede18..f3c507e36 100644 --- a/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedBatchTest.java +++ b/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedBatchTest.java @@ -14,14 +14,14 @@ import io.vertx.ext.unit.junit.VertxUnitRunner; import io.vertx.mysqlclient.MySQLConnectOptions; import io.vertx.mysqlclient.junit.ProxySQLRule; -import org.junit.ClassRule; +import org.junit.Rule; import org.junit.runner.RunWith; @RunWith(VertxUnitRunner.class) public class ProxySQLPreparedBatchTest extends MySQLPreparedBatchTest { - @ClassRule - public static ProxySQLRule proxySql = new ProxySQLRule(rule); + @Rule + public ProxySQLRule proxySql = new ProxySQLRule(rule); @Override protected void initConnector() { diff --git a/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedQueryTest.java b/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedQueryTest.java index 0cee678ad..3652f9ad5 100644 --- a/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedQueryTest.java +++ b/vertx-mysql-client/src/test/java/io/vertx/mysqlclient/tck/ProxySQLPreparedQueryTest.java @@ -14,16 +14,16 @@ import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.junit.VertxUnitRunner; import io.vertx.mysqlclient.junit.ProxySQLRule; -import org.junit.ClassRule; import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(VertxUnitRunner.class) public class ProxySQLPreparedQueryTest extends MySQLPreparedQueryTest { - @ClassRule - public static ProxySQLRule proxySql = new ProxySQLRule(rule); + @Rule + public ProxySQLRule proxySql = new ProxySQLRule(rule); @Override protected void initConnector() {