Skip to content

Commit ae2d36f

Browse files
committed
Avoid Oracle test suite failures in OracleConnectionTest
Oracle client does not queue commands like other clients. Instead, it executes them immediately on the Oracle JDBC connection. So these tests often fails because we can't guarantee the connection will be closed after the query has been executed. Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
1 parent 8abdd71 commit ae2d36f

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

vertx-oracle-client/src/test/java/io/vertx/oracleclient/test/tck/OracleConnectionTest.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
*/
1111
package io.vertx.oracleclient.test.tck;
1212

13-
import io.vertx.ext.unit.Async;
1413
import io.vertx.ext.unit.TestContext;
1514
import io.vertx.ext.unit.junit.VertxUnitRunner;
1615
import io.vertx.oracleclient.test.junit.OracleRule;
1716
import io.vertx.sqlclient.spi.DatabaseMetadata;
1817
import io.vertx.sqlclient.tck.ConnectionTestBase;
1918
import org.junit.ClassRule;
19+
import org.junit.Ignore;
2020
import org.junit.Test;
2121
import org.junit.runner.RunWith;
2222

@@ -38,32 +38,16 @@ public void tearDown(TestContext ctx) {
3838
super.tearDown(ctx);
3939
}
4040

41+
@Override
4142
@Test
43+
@Ignore("Does not work with this client because commands are executed immediately, not queued")
4244
public void testCloseWithErrorInProgress(TestContext ctx) {
43-
Async async = ctx.async(2);
44-
connect(ctx.asyncAssertSuccess(conn -> {
45-
conn.query("SELECT whatever from DOES_NOT_EXIST").execute(ctx.asyncAssertFailure(err -> async.countDown()));
46-
conn.closeHandler(v -> async.countDown());
47-
conn.close();
48-
}));
49-
async.await();
5045
}
5146

47+
@Override
5248
@Test
49+
@Ignore("Does not work with this client because commands are executed immediately, not queued")
5350
public void testCloseWithQueryInProgress(TestContext ctx) {
54-
Async async = ctx.async(2);
55-
connect(ctx.asyncAssertSuccess(conn -> {
56-
conn.query("SELECT id, message from immutable").execute(ctx.asyncAssertFailure(result -> {
57-
ctx.assertEquals(2, async.count());
58-
async.countDown();
59-
}));
60-
conn.closeHandler(v -> {
61-
ctx.assertEquals(1, async.count());
62-
async.countDown();
63-
});
64-
conn.close();
65-
}));
66-
async.await();
6751
}
6852

6953
@Override

0 commit comments

Comments
 (0)