fix yarn jvm does not exit properly in the unit test