Make LockCleanupStateTransferTest more robust