Skip to content

Commit 921ad97

Browse files
committed
Add Oracle Tracing and Metrics tests
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
1 parent 9474601 commit 921ad97

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2011-2022 Contributors to the Eclipse Foundation
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
7+
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
8+
*
9+
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
10+
*/
11+
12+
package io.vertx.oracleclient.test.tck;
13+
14+
import io.vertx.core.Vertx;
15+
import io.vertx.ext.unit.TestContext;
16+
import io.vertx.oracleclient.OraclePool;
17+
import io.vertx.oracleclient.test.junit.OracleRule;
18+
import io.vertx.sqlclient.Pool;
19+
import io.vertx.sqlclient.PoolOptions;
20+
import io.vertx.sqlclient.tck.MetricsTestBase;
21+
import org.junit.ClassRule;
22+
import org.junit.Ignore;
23+
import org.junit.Test;
24+
25+
public class OracleMetricsTest extends MetricsTestBase {
26+
27+
@ClassRule
28+
public static OracleRule rule = OracleRule.SHARED_INSTANCE;
29+
30+
@Override
31+
protected Pool createPool(Vertx vertx) {
32+
return OraclePool.pool(vertx, rule.options(), new PoolOptions());
33+
}
34+
35+
@Override
36+
protected String statement(String... parts) {
37+
return String.join(" ?", parts);
38+
}
39+
40+
@Test
41+
@Ignore("Oracle does not support batched SELECT")
42+
@Override
43+
public void testPreparedBatchQuery(TestContext ctx) {
44+
super.testPreparedBatchQuery(ctx);
45+
}
46+
47+
@Test
48+
@Ignore("Oracle does not support batched SELECT")
49+
@Override
50+
public void testPrepareAndBatchQuery(TestContext ctx) {
51+
super.testPrepareAndBatchQuery(ctx);
52+
}
53+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2011-2022 Contributors to the Eclipse Foundation
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
7+
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
8+
*
9+
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
10+
*/
11+
12+
package io.vertx.oracleclient.test.tck;
13+
14+
import io.vertx.core.Vertx;
15+
import io.vertx.ext.unit.TestContext;
16+
import io.vertx.ext.unit.junit.VertxUnitRunner;
17+
import io.vertx.oracleclient.OraclePool;
18+
import io.vertx.oracleclient.test.junit.OracleRule;
19+
import io.vertx.sqlclient.Pool;
20+
import io.vertx.sqlclient.PoolOptions;
21+
import io.vertx.sqlclient.tck.TracingTestBase;
22+
import org.junit.ClassRule;
23+
import org.junit.Ignore;
24+
import org.junit.Test;
25+
import org.junit.runner.RunWith;
26+
27+
@RunWith(VertxUnitRunner.class)
28+
public class OracleTracingTest extends TracingTestBase {
29+
30+
@ClassRule
31+
public static OracleRule rule = OracleRule.SHARED_INSTANCE;
32+
33+
@Override
34+
protected Pool createPool(Vertx vertx) {
35+
return OraclePool.pool(vertx, rule.options(), new PoolOptions());
36+
}
37+
38+
@Override
39+
protected String statement(String... parts) {
40+
return String.join(" ?", parts);
41+
}
42+
43+
@Test
44+
@Ignore("Oracle does not support batched SELECT")
45+
@Override
46+
public void testTraceBatchQuery(TestContext ctx) {
47+
super.testTraceBatchQuery(ctx);
48+
}
49+
}

0 commit comments

Comments
 (0)