Take care of test case dependency when deleting