prevent test process from hang in some cases