use of org.keycloak.models.dblock.DBLockProviderFactory in project keycloak by keycloak.
the class DBLockTest method before.
@Before
public void before() throws Exception {
inComittedTransaction(1, (session, i) -> {
// Set timeouts for testing
DBLockManager lockManager = new DBLockManager(session);
DBLockProviderFactory lockFactory = lockManager.getDBLockFactory();
lockFactory.setTimeouts(LOCK_RECHECK_MILLIS, LOCK_TIMEOUT_MILLIS);
// Drop lock table, just to simulate racing threads for create lock table and insert lock record into it.
lockManager.getDBLock().destroyLockInfo();
return null;
});
}
Aggregations