Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgreenbird committed May 14, 2024
1 parent e7b89f4 commit 5c88f0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/com/microsoft/sqlserver/jdbc/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public static void dropDatabaseIfExists(String databaseName, String connectionSt
*/
public static void dropSchemaIfExists(String schemaName, Statement stmt) throws SQLException {
stmt.execute("if EXISTS (SELECT * FROM sys.schemas where name = '" + escapeSingleQuotes(schemaName)
+ "') drop schema " + AbstractSQLGenerator.escapeIdentifier(schemaName));
+ "') DROP SCHEMA" + AbstractSQLGenerator.escapeIdentifier(schemaName));
}

/**
Expand Down Expand Up @@ -1139,7 +1139,8 @@ public static String getConnectionID(
public static void freeProcCache(Statement stmt) {
try {
stmt.execute("DBCC FREEPROCCACHE");
} catch (Exception e) {
// ignore error - some tests fails due to permission issues from managed identity, this does not seem to affect tests
} catch (Exception e) {}
}
}
}

0 comments on commit 5c88f0f

Please sign in to comment.