Skip to content

Commit 448bd74

Browse files
authored
Simplify OracleSimpleQueryTest (#1098)
Does not need to override parent class test methods. The issue was that Oracle does not like the semicolon at the end of the query. Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
1 parent 17719e5 commit 448bd74

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

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

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,4 @@ public class OracleSimpleQueryTest extends SimpleQueryTestBase {
2828
protected void initConnector() {
2929
connector = ClientConfig.CONNECT.connect(vertx, rule.options());
3030
}
31-
32-
@Override
33-
public void cleanTestTable(TestContext ctx) {
34-
connect(ctx.asyncAssertSuccess(conn -> {
35-
conn.preparedQuery("TRUNCATE TABLE mutable").execute(result -> {
36-
conn.close();
37-
});
38-
}));
39-
}
40-
41-
@Test
42-
public void testInsert(TestContext ctx) {
43-
Async async = ctx.async();
44-
this.connector.connect(ctx.asyncAssertSuccess((conn) -> {
45-
conn.query("INSERT INTO mutable (id, val) VALUES (1, 'Whatever')").execute(ctx.asyncAssertSuccess((r1) -> {
46-
ctx.assertEquals(1, r1.rowCount());
47-
async.complete();
48-
}));
49-
}));
50-
async.await();
51-
}
52-
5331
}

vertx-sql-client/src/test/java/io/vertx/sqlclient/tck/SimpleQueryTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void testUpdate(TestContext ctx) {
111111
public void testInsert(TestContext ctx) {
112112
Async async = ctx.async();
113113
connector.connect(ctx.asyncAssertSuccess(conn -> {
114-
conn.query("INSERT INTO mutable (id, val) VALUES (1, 'Whatever');").execute(ctx.asyncAssertSuccess(r1 -> {
114+
conn.query("INSERT INTO mutable (id, val) VALUES (1, 'Whatever')").execute(ctx.asyncAssertSuccess(r1 -> {
115115
ctx.assertEquals(1, r1.rowCount());
116116
async.complete();
117117
}));
@@ -134,7 +134,7 @@ public void testDelete(TestContext ctx) {
134134

135135
protected void cleanTestTable(TestContext ctx) {
136136
connect(ctx.asyncAssertSuccess(conn -> {
137-
conn.query("TRUNCATE TABLE mutable;").execute(ctx.asyncAssertSuccess(result -> {
137+
conn.query("TRUNCATE TABLE mutable").execute(ctx.asyncAssertSuccess(result -> {
138138
conn.close();
139139
}));
140140
}));

0 commit comments

Comments
 (0)