[Utils][test] Fix an invalid call of g_main_loop_quit().