[Minor] trying to fix broken LockingTest which has an infinite loop