/// <summary> /// See <see cref="TestingDistributedLockEngine.PerformCleanupForLockAbandonment"/> /// </summary> internal virtual void PerformCleanupForLockAbandonment() { // since connections are pooled, abandoning a SQL lock won't release the lock right away because the connection // simply releases back to the pool but doesn't receive an sp_resetconnection until it is re-opened or the pool // is cleared. Therefore, we clear the pool! SqlTestHelper.ClearAllPools(); GC.Collect(); GC.WaitForPendingFinalizers(); }