TestZKLocksService is highly dependent on the order of things happening because its testing locks. I've seen tests in this class fail a number of times with messages like this:
which is because things happened in a slightly different order than it was expecting (though everything is happening correctly)
When I created these tests, I just took the TestLockService and made it use ZKLocks instead of MemoryLocks. The ZKLocks take longer to lock than the MemoryLocks, so the timings are sometimes too fast. I think we just need to increase the sleep calls, and use the sleep() method instead of Thread.sleep() so it will scale with the "waitfor ratio" on slower machines.