Skip to content

Commit

Permalink
Fix JdbcMetaTest
Browse files Browse the repository at this point in the history
  • Loading branch information
gartens committed Apr 19, 2024
1 parent ccde81f commit ae00081
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dbms/src/test/java/org/polypheny/db/jdbc/JdbcMetaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,14 @@ public void testGetCatalogs() throws SQLException {

// Check number of columns
int totalColumns = rsmd.getColumnCount();
assertEquals( 3, totalColumns, "Wrong number of columns" );
assertEquals( 2, totalColumns, "Wrong number of columns" );

// Check column names
assertEquals( "TABLE_CAT", rsmd.getColumnName( 1 ) );
assertEquals( "OWNER", rsmd.getColumnName( 2 ) );
assertEquals( "DEFAULT_SCHEMA", rsmd.getColumnName( 3 ) );
assertEquals( "DEFAULT_SCHEMA", rsmd.getColumnName( 2 ) );

// Check data
final Object[] databaseApp = new Object[]{ "APP", "system", "public" };
final Object[] databaseApp = new Object[]{ "APP", "public" };

TestHelper.checkResultSet(
connection.getMetaData().getCatalogs(),
Expand Down Expand Up @@ -382,9 +381,9 @@ public void testMetaGetColumns() throws SQLException {
assertEquals( "COLLATION", rsmd.getColumnName( 25 ), "Wrong column name" );

// Check data
final Object[] columnId = new Object[]{ null, "public", "foo", "id", 4, "INTEGER", null, null, null, null, 0, "", null, null, null, null, 1, "NO", null, null, null, null, "No", "No", null };
final Object[] columnName = new Object[]{ null, "public", "foo", "name", 12, "VARCHAR", 20, null, null, null, 1, "", null, null, null, null, 2, "YES", null, null, null, null, "No", "No", "CASE_INSENSITIVE" };
final Object[] columnBar = new Object[]{ null, "public", "foo", "bar", 12, "VARCHAR", 33, null, null, null, 1, "", null, null, null, null, 3, "YES", null, null, null, null, "No", "No", "CASE_SENSITIVE" };
final Object[] columnId = new Object[]{ null, "public", "foo", "id", 4, "INTEGER", null, null, null, null, 0, "", null, null, null, null, 1, "NO", null, null, null, null, "NO", "NO", null };
final Object[] columnName = new Object[]{ null, "public", "foo", "name", 12, "VARCHAR", 20, null, null, null, 1, "", null, null, null, null, 2, "YES", null, null, null, null, "NO", "NO", "CASE_INSENSITIVE" };
final Object[] columnBar = new Object[]{ null, "public", "foo", "bar", 12, "VARCHAR", 33, null, null, null, 1, "", null, null, null, null, 3, "YES", null, null, null, null, "NO", "NO", "CASE_SENSITIVE" };
TestHelper.checkResultSet(
connection.getMetaData().getColumns( "APP", null, "foo", null ),
ImmutableList.of( columnId, columnName, columnBar ) );
Expand Down

0 comments on commit ae00081

Please sign in to comment.