add setlock compatibility test.
sleep rand() sec while waiting to lock.