Skip to content

Commit 2639d74

Browse files
committed
Disable sequence tests for DB2/z until implemented
1 parent 77bd99d commit 2639d74

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

vertx-db2-client/src/test/java/io/vertx/db2client/QueryVariationsTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.vertx.db2client;
22

3+
import static org.junit.Assume.assumeFalse;
4+
35
import java.util.Arrays;
46
import java.util.concurrent.atomic.AtomicInteger;
57
import java.util.function.Consumer;
@@ -153,6 +155,8 @@ public void testSectionReuse(TestContext ctx) {
153155
*/
154156
@Test
155157
public void testSequenceQuery(TestContext ctx) {
158+
assumeFalse("TODO: Sequences behave differently on DB2/z and need to be implemented properly", rule.isZOS());
159+
156160
connect(ctx.asyncAssertSuccess(con -> {
157161
con.query("values nextval for my_seq")
158162
.execute(ctx.asyncAssertSuccess(rowSet1 -> {
@@ -179,6 +183,8 @@ public void testSequenceQuery(TestContext ctx) {
179183
*/
180184
@Test
181185
public void testSequenceQueryPrepared(TestContext ctx) {
186+
assumeFalse("TODO: Sequences behave differently on DB2/z and need to be implemented properly", rule.isZOS());
187+
182188
connect(ctx.asyncAssertSuccess(con -> {
183189
con.preparedQuery("VALUES nextval for my_seq")
184190
.execute(ctx.asyncAssertSuccess(rowSet1 -> {

vertx-db2-client/src/test/resources/init.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ CREATE TABLE collector_test
105105
INSERT INTO collector_test VALUES (1, 32767, 2147483647, 9223372036854775807, 123.456, 1.234567, 'HELLO,WORLD');
106106
INSERT INTO collector_test VALUES (2, 32767, 2147483647, 9223372036854775807, 123.456, 1.234567, 'hello,world');
107107

108-
-- Sequence used by QueryVariationsTest
109-
DROP SEQUENCE my_seq;
110-
CREATE SEQUENCE my_seq INCREMENT BY 1 START WITH 1;
111-
112108
-- used by DB2DataTypeTest
113109
DROP TABLE IF EXISTS db2_types;
114110
CREATE TABLE db2_types
@@ -118,3 +114,7 @@ CREATE TABLE db2_types
118114
test_float FLOAT,
119115
test_bytes VARCHAR(255) for bit data
120116
);
117+
118+
-- Sequence used by QueryVariationsTest
119+
DROP SEQUENCE my_seq;
120+
CREATE SEQUENCE my_seq INCREMENT BY 1 START WITH 1;

vertx-db2-client/src/test/resources/init.zos.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ CREATE TABLE ROWTEST(
116116
);
117117

118118
-- used by DB2DataTypeTest
119-
DROP TABLE IF EXISTS db2_types;
119+
DROP TABLE db2_types;
120120
CREATE TABLE db2_types
121121
(
122122
id INT,
123-
test_float FLOAT
123+
test_byte SMALLINT,
124+
test_float FLOAT,
125+
test_bytes VARCHAR(255) for bit data
124126
);
125127

126128
-- Sequence used by QueryVariationsTest

0 commit comments

Comments
 (0)