[Utils][test] Fix a problem that may access the deleted object (mutex).