Remove unnecessary locking in assertQueryFails method
Locking is not needed since no QueryRunner state is changed.
@@ -162,7 +162,6 @@ public abstract class AbstractTestQueryFramework
protected void assertQueryFails(Session session, @Language("SQL") String sql, @Language("RegExp") String expectedMessageRegExp)
{
- queryRunner.getExclusiveLock().lock();
try {
queryRunner.execute(session, sql);
fail(format("Expected query to fail: %s", sql));
@@ -170,9 +169,6 @@ public abstract class AbstractTestQueryFramework
catch (RuntimeException ex) {
assertExceptionMessage(sql, ex, expectedMessageRegExp);
}
- finally {
- queryRunner.getExclusiveLock().unlock();
- }
}
protected void assertAccessAllowed(@Language("SQL") String sql, TestingPrivilege... deniedPrivileges)
