Skip to content

Commit 0093437

Browse files
author
Axyoan Marcelo
committed
Fix for tests in DataSourceRegressionTest and ConnectionTest that were failing on Windows.
Change-Id: I9835021d1f57f4bdd77d64416617889131611914
1 parent d8762f3 commit 0093437

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/test/java/testsuite/regression/DataSourceRegressionTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ void testBug104954() throws Exception {
596596

597597
this.rs = testStmt.executeQuery("SELECT DATABASE()");
598598
assertTrue(this.rs.next());
599+
if (isServerRunningOnWindows()) {
600+
db = db.toLowerCase();
601+
}
599602
assertEquals(db, this.rs.getString(1));
600603
assertFalse(this.rs.next());
601604
}

src/test/java/testsuite/simple/ConnectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public void testLocalInfileWithUrl() throws Exception {
502502
loadStmt.execute("LOAD DATA LOCAL INFILE 'foo:///' INTO TABLE testLocalInfileWithUrl" + charset);
503503
} catch (SQLException sqlEx) {
504504
assertTrue(sqlEx.getMessage() != null);
505-
assertTrue(sqlEx.getMessage().indexOf("FileNotFoundException") != -1);
505+
assertTrue(sqlEx.getMessage().indexOf(isServerRunningOnWindows() ? "IOException" : "FileNotFoundException") != -1);
506506
}
507507
}
508508

0 commit comments

Comments
 (0)