Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 23, 2023
1 parent d0809cc commit 3424be5
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ public void testNewDriver() throws SQLException {

PrqlDriver prqlDriver = (PrqlDriver) DriverManager.getDriver(invalidUrl);
int len = prqlDriver.getPropertyInfo(invalidUrl, props).length;
Assert.assertTrue(len > 0, "Shoud have at least one property");
Assert.assertTrue(len > 0, "Should have at least one property");
Assert.assertThrows(SQLException.class, () -> prqlDriver.connect(invalidUrl, props));

final String correctUrl = invalidUrl.replace("sxqlserver", "sqlserver");
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length == len,
"Should have same amount of properies");
"Should have same amount of properties");
Assert.assertThrows(SQLException.class, () -> prqlDriver.connect(correctUrl, props));

props.setProperty("prql.custom.classpath",
"https://repo1.maven.org/maven2/net/sourceforge/jtds/jtds/1.3.1/jtds-1.3.1.jar");
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length > len, "Should have more properies");
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length > len, "Should have more properties");

props.clear();
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length > len,
"Should have more properies due to cached driver");
"Should have more properties due to cached driver");
Assert.assertThrows(SQLException.class, () -> prqlDriver.connect(correctUrl, props));
}

Expand All @@ -68,7 +68,7 @@ public void testQuery(String url, String prql, String sql) throws SQLException {
while (rs.next()) {
count++;
}
// we're good, as long as no error occured in read
// we're good, as long as no error occurred in read
Assert.assertTrue(count >= 0L);
}

Expand Down

0 comments on commit 3424be5

Please sign in to comment.