Test improvement, deadlock fix for bonecp