Skip to content

Commit

Permalink
[CONJ-1021] correcting windows GSSAPI test
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Nov 7, 2022
1 parent 79c4ad3 commit 610cf5b
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -4,14 +4,12 @@

package org.mariadb.jdbc.integration;

import java.sql.*;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;

import java.sql.*;

public class GssapiAuthenticationTest extends Common {


@Test
public void nativePassword() throws Exception {
Assumptions.assumeTrue(isWindows());
Expand All @@ -22,8 +20,8 @@ public void nativePassword() throws Exception {
// eat
}
System.out.println("user name:" + System.getProperty("user.name"));
stmt.execute("CREATE USER "+System.getProperty("user.name") + " IDENTIFIED VIA gssapi as 'GROUP:Administrators'");
stmt.execute("GRANT ALL PRIVILEGES ON *.* TO "+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"));

String gssapiUrl = String.format("jdbc:mariadb://%s:%s/%s", hostname, port, database);
try (Connection con = DriverManager.getConnection(gssapiUrl)) {
Expand Down

0 comments on commit 610cf5b

Please sign in to comment.