Skip to content

Commit

Permalink
JDBC-331 Add test for short table name
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Nov 24, 2013
1 parent d2c621d commit 06616b1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/org/firebirdsql/jca/TestFBDatabaseMetaData.java
Expand Up @@ -539,6 +539,23 @@ public void testGetPrimaryKeysLongTableName() throws Exception {
}
}

/**
* Using a very short table name for {@link DatabaseMetaData#getPrimaryKeys(String, String, String)}
* should return a result.
*/
public void testGetPrimaryKeysShortTableName() throws Exception {
String tableName = "A";
createTable(tableName);
try {
t.begin();
ResultSet rs = dmd.getPrimaryKeys(null, null, tableName);
assertTrue("Should return primary key information", rs.next());
t.commit();
} finally {
dropTable(tableName);
}
}

/**
* {@link DatabaseMetaData#getPrimaryKeys(String, String, String)} should not accept a LIKE pattern.
*/
Expand Down

0 comments on commit 06616b1

Please sign in to comment.