Skip to content

Commit

Permalink
Test | Fix random test issues with BVT Test (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra authored Mar 29, 2019
1 parent 5b02953 commit 45525dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void testCreatepreparedStatement() throws SQLException {

String colName = table1.getEscapedColumnName(7);
String value = table1.getRowData(7, 0).toString();
String query = "SELECT * from " + table1.getEscapedTableName() + " where " + colName + " = ? ";
String query = "SELECT * from " + table1.getEscapedTableName() + " where " + colName + " = ? "+ " ORDER BY " + table1.getEscapedColumnName(0);

try (DBConnection conn = new DBConnection(connectionString);
DBPreparedStatement pstmt = conn.prepareStatement(query)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void verifydata(int ordinal, Class<?> coercion, Object expectedData, Obje

case java.sql.Types.TIME:
String retrievedTime = retrieved.toString();
String expectedTime = expectedData.toString().substring(0, retrievedTime.length());
String expectedTime = expectedData.toString();
assertTrue(expectedTime.equalsIgnoreCase(retrievedTime),
"Unexpected time value, expected: " + expectedTime + " ,received: " + retrievedTime);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public SqlTime() {
public Object createdata() {
Time temp = new Time(
ThreadLocalRandom.current().nextLong(((Time) minvalue).getTime(), ((Time) maxvalue).getTime()));
String timeNano = temp.toString() + "." + generateRandomInt(this.scale);
String timeNano = temp.toString();
return timeNano;

// can pass String rather than converting to loacTime, but leaving it
Expand Down

0 comments on commit 45525dc

Please sign in to comment.