General test on thread with contolling locks