6
6
import static org .junit .jupiter .api .Assertions .assertThrows ;
7
7
import static org .junit .jupiter .api .Assertions .assertTrue ;
8
8
import static org .tarantool .TestAssumptions .assumeMinimalServerVersion ;
9
+ import static org .tarantool .TestAssumptions .assumeServerVersionLessThan ;
9
10
10
11
import org .tarantool .ServerVersion ;
11
12
import org .tarantool .TarantoolTestHelper ;
12
- import org .tarantool .jdbc .type .JdbcType ;
13
- import org .tarantool .jdbc .type .TarantoolSqlType ;
14
13
15
14
import org .junit .jupiter .api .AfterAll ;
16
15
import org .junit .jupiter .api .AfterEach ;
@@ -201,6 +200,7 @@ public void testCaseSensitiveColumns() throws SQLException {
201
200
@ Test
202
201
@ DisplayName ("returned case insensitive columns" )
203
202
public void testCaseInsensitiveColumns () throws SQLException {
203
+ assumeServerVersionLessThan (testHelper .getInstanceVersion (), ServerVersion .V_2_2 );
204
204
testHelper .executeSql (
205
205
"CREATE TABLE test(id INT PRIMARY KEY, num_val DOUBLE)"
206
206
);
@@ -218,6 +218,7 @@ public void testCaseInsensitiveColumns() throws SQLException {
218
218
@ Test
219
219
@ DisplayName ("returned searchable columns" )
220
220
public void testSearchableColumns () throws SQLException {
221
+ assumeServerVersionLessThan (testHelper .getInstanceVersion (), ServerVersion .V_2_2 );
221
222
testHelper .executeSql (
222
223
"CREATE TABLE test(id INT PRIMARY KEY, num_val DOUBLE, text_val TEXT, bin_val SCALAR)"
223
224
);
@@ -237,6 +238,7 @@ public void testSearchableColumns() throws SQLException {
237
238
@ Test
238
239
@ DisplayName ("returned no monetary columns" )
239
240
public void testCurrencyColumns () throws SQLException {
241
+ assumeServerVersionLessThan (testHelper .getInstanceVersion (), ServerVersion .V_2_2 );
240
242
testHelper .executeSql (
241
243
"CREATE TABLE test(id INT PRIMARY KEY, num_val DOUBLE, text_val TEXT, bin_val SCALAR)"
242
244
);
@@ -256,6 +258,7 @@ public void testCurrencyColumns() throws SQLException {
256
258
@ Test
257
259
@ DisplayName ("returned signed columns" )
258
260
public void testSignedColumns () throws SQLException {
261
+ assumeServerVersionLessThan (testHelper .getInstanceVersion (), ServerVersion .V_2_2 );
259
262
testHelper .executeSql (
260
263
"CREATE TABLE test(id INT PRIMARY KEY, double_val DOUBLE, real_val REAL, float_val FLOAT)"
261
264
);
@@ -294,6 +297,7 @@ public void testNotSignedColumns() throws SQLException {
294
297
@ Test
295
298
@ DisplayName ("returned numeric column types" )
296
299
public void testColumnsNumericTypes () throws SQLException {
300
+ assumeServerVersionLessThan (testHelper .getInstanceVersion (), ServerVersion .V_2_2 );
297
301
testHelper .executeSql (
298
302
"CREATE TABLE test(id INT PRIMARY KEY, f_val FLOAT, d_val DOUBLE, r_val REAL)"
299
303
);
@@ -303,7 +307,7 @@ public void testColumnsNumericTypes() throws SQLException {
303
307
) {
304
308
ResultSetMetaData rsMeta = resultSet .getMetaData ();
305
309
306
- assertEquals (Types .INTEGER , rsMeta .getColumnType (1 ));
310
+ assertEquals (Types .BIGINT , rsMeta .getColumnType (1 ));
307
311
assertEquals ("integer" , rsMeta .getColumnTypeName (1 ));
308
312
assertEquals ("java.lang.Integer" , rsMeta .getColumnClassName (1 ));
309
313
@@ -335,17 +339,17 @@ public void testColumnsTextualTypes() throws SQLException {
335
339
) {
336
340
ResultSetMetaData rsMeta = resultSet .getMetaData ();
337
341
338
- assertEquals (Types .INTEGER , rsMeta .getColumnType (1 ));
342
+ assertEquals (Types .BIGINT , rsMeta .getColumnType (1 ));
339
343
assertEquals ("integer" , rsMeta .getColumnTypeName (1 ));
340
- assertEquals ("java.lang.Integer " , rsMeta .getColumnClassName (1 ));
344
+ assertEquals ("java.lang.Long " , rsMeta .getColumnClassName (1 ));
341
345
342
346
assertEquals (Types .VARCHAR , rsMeta .getColumnType (2 ));
343
- assertEquals ("varchar " , rsMeta .getColumnTypeName (2 ));
347
+ assertEquals ("string " , rsMeta .getColumnTypeName (2 ));
344
348
assertEquals ("java.lang.String" , rsMeta .getColumnClassName (2 ));
345
349
346
350
// TEXT and VARCHAR are not distinguishable
347
351
assertEquals (Types .VARCHAR , rsMeta .getColumnType (3 ));
348
- assertEquals ("varchar " , rsMeta .getColumnTypeName (3 ));
352
+ assertEquals ("string " , rsMeta .getColumnTypeName (3 ));
349
353
assertEquals ("java.lang.String" , rsMeta .getColumnClassName (3 ));
350
354
351
355
assertEquals (Types .BINARY , rsMeta .getColumnType (4 ));
0 commit comments