Skip to content

Commit

Permalink
[misc] windows test correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Apr 26, 2023
1 parent 7d24ade commit fa51fd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ public void basic() throws SQLException {
ds.setUrl(mDefUrl);
testDs(ds);

ds = new MariaDbDataSource();
ds.setPassword("ttt");
ds.setUrl(mDefUrl);
assertThrows(SQLException.class, ds::getConnection);
MariaDbDataSource ds2 = new MariaDbDataSource();
ds2.setUrl(mDefUrl);
ds2.setPassword("ttt");
ds2.setUser("ttt");
assertThrows(SQLException.class, ds2::getConnection);
}

private void testDs(MariaDbDataSource ds) throws SQLException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public void nativePassword() throws Exception {
} catch (SQLException e) {
// eat
}
System.out.println("user name:" + System.getProperty("user.name"));

stmt.execute("DROP USER IF EXISTS " + System.getProperty("user.name"));
stmt.execute("CREATE USER " + System.getProperty("user.name") + " IDENTIFIED VIA gssapi");
stmt.execute("GRANT ALL PRIVILEGES ON *.* TO " + System.getProperty("user.name"));

Expand Down

0 comments on commit fa51fd4

Please sign in to comment.