From 78f59b6452908e9eb66b029f84de4a4eeec530ca Mon Sep 17 00:00:00 2001 From: kolzeq Date: Thu, 4 Feb 2016 10:14:39 +0100 Subject: [PATCH] [misc] test correction due to bug MDEV-8984 --- src/test/java/org/mariadb/jdbc/BaseTest.java | 12 ++++++++++++ .../java/org/mariadb/jdbc/DatabaseMetadataTest.java | 4 +--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/mariadb/jdbc/BaseTest.java b/src/test/java/org/mariadb/jdbc/BaseTest.java index e7e155dcd..d22778c82 100644 --- a/src/test/java/org/mariadb/jdbc/BaseTest.java +++ b/src/test/java/org/mariadb/jdbc/BaseTest.java @@ -442,6 +442,18 @@ public boolean minVersion(int major, int minor) throws SQLException { } + /** + * Cancel if database version match. + * @param major db major version + * @param minor db minor version + * @throws SQLException exception + */ + public void cancelForVersion(int major, int minor) throws SQLException { + + String dbVersion = sharedConnection.getMetaData().getDatabaseProductVersion(); + Assume.assumeFalse(dbVersion.startsWith(major + "." + minor)); + + } /** * Cancel if database version match. diff --git a/src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java b/src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java index df1e0a03b..362e352bd 100644 --- a/src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java +++ b/src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java @@ -500,9 +500,7 @@ public void getCatalogsBasic() throws SQLException { @Test public void getColumnsBasic() throws SQLException { - cancelForVersion(10, 1, 8); //due to server error MDEV-8984 - cancelForVersion(10, 1, 9); - cancelForVersion(10, 1, 10); + cancelForVersion(10, 1); //due to server error MDEV-8984 testResultSetColumns(sharedConnection.getMetaData().getColumns(null, null, null, null), "TABLE_CAT String,TABLE_SCHEM String,TABLE_NAME String,COLUMN_NAME String," + "DATA_TYPE int,TYPE_NAME String,COLUMN_SIZE int,BUFFER_LENGTH int,"