Skip to content

Commit

Permalink
Fix test failure of revocable token table test
Browse files Browse the repository at this point in the history
[#141361869] https://www.pivotaltracker.com/story/show/141361869

Signed-off-by: Jennifer Hamon <jhamon@pivotal.io>
  • Loading branch information
Priyata25 authored and cf-identity committed May 2, 2017
1 parent 2d4fb35 commit b9220e8
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -66,7 +66,7 @@ public boolean testColumn(String name, String type, int size) {
public boolean testColumn(List<TestColumn> columns, String name, String type, int size) {
for (TestColumn c : columns) {
if (c.name.equalsIgnoreCase(name)) {
return "varchar".equalsIgnoreCase(type) && !"data".equalsIgnoreCase(name) ?
return ("varchar".equalsIgnoreCase(type) || "nvarchar".equalsIgnoreCase(type)) && !"data".equalsIgnoreCase(name) ?
c.type.toLowerCase().contains(type.toLowerCase()) && c.size == size :
c.type.toLowerCase().contains(type.toLowerCase());
}
Expand All @@ -86,9 +86,10 @@ public void validate_table() throws Exception {
while (rs.next()) {
String rstableName = rs.getString("TABLE_NAME");
String rscolumnName = rs.getString("COLUMN_NAME");
int columnSize = rs.getInt("COLUMN_SIZE");
int actualColumnSize = rs.getInt("COLUMN_SIZE");
if (tableName.equalsIgnoreCase(rstableName)) {
assertTrue("Testing column:"+rscolumnName, testColumn(rscolumnName, rs.getString("TYPE_NAME"), columnSize));
String actualColumnType = rs.getString("TYPE_NAME");
assertTrue("Testing column:"+rscolumnName, testColumn(rscolumnName, actualColumnType, actualColumnSize));
foundTable = true;
foundColumn++;
}
Expand Down

0 comments on commit b9220e8

Please sign in to comment.