Skip to content

Commit

Permalink
[misc] test correction due to bug MDEV-8984
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Feb 4, 2016
1 parent e281ce5 commit 78f59b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/test/java/org/mariadb/jdbc/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/org/mariadb/jdbc/DatabaseMetadataTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,"
Expand Down

0 comments on commit 78f59b6

Please sign in to comment.