It seems like your test rely on time for synchronization. I feel that it will fail if the sytem is busy or the threads are ordered differently depending on the OS :-(    I would either prefer to remove the test or write a test with better synchronization between the 3 threads.    cc @pablogsal 