replaced buggy lock test that relied on sleeps to try and ensure

a specific ordering of lock acquirement and release.