diff --git a/src/test/java/org/mariadb/jdbc/integration/DataSourceTest.java b/src/test/java/org/mariadb/jdbc/integration/DataSourceTest.java index 0144b0e33..f04fbab03 100644 --- a/src/test/java/org/mariadb/jdbc/integration/DataSourceTest.java +++ b/src/test/java/org/mariadb/jdbc/integration/DataSourceTest.java @@ -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 { diff --git a/src/test/java/org/mariadb/jdbc/integration/GssapiAuthenticationTest.java b/src/test/java/org/mariadb/jdbc/integration/GssapiAuthenticationTest.java index d5df69d8d..af4016440 100644 --- a/src/test/java/org/mariadb/jdbc/integration/GssapiAuthenticationTest.java +++ b/src/test/java/org/mariadb/jdbc/integration/GssapiAuthenticationTest.java @@ -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"));