Skip to content

Commit 47eb6dc

Browse files
authored
Fix lifecycle bug in MSSQL and Oracle rule (eclipse-vertx#1154)
The shared instance was started and stopped several times whereas it should happen only once. Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
1 parent a6a2c01 commit 47eb6dc

File tree

2 files changed

+2
-2
lines changed
  • vertx-mssql-client/src/test/java/io/vertx/mssqlclient/junit
  • vertx-oracle-client/src/test/java/io/vertx/oracleclient/test/junit

2 files changed

+2
-2
lines changed

vertx-mssql-client/src/test/java/io/vertx/mssqlclient/junit/MSSQLRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private boolean isNullOrEmpty(String connectionUri) {
6565

6666
@Override
6767
protected void after() {
68-
if (isNullOrEmpty(System.getProperty("connection.uri")) || this != SHARED_INSTANCE) {
68+
if (isNullOrEmpty(System.getProperty("connection.uri")) && this != SHARED_INSTANCE) {
6969
stopMSSQL();
7070
}
7171
}

vertx-oracle-client/src/test/java/io/vertx/oracleclient/test/junit/OracleRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private boolean isNullOrEmpty(String s) {
4848

4949
@Override
5050
protected void after() {
51-
if (isNullOrEmpty(System.getProperty("connection.uri")) || this != SHARED_INSTANCE) {
51+
if (isNullOrEmpty(System.getProperty("connection.uri")) && this != SHARED_INSTANCE) {
5252
stopOracle();
5353
}
5454
}

0 commit comments

Comments
 (0)