Adjust signal trigger wait time to fix unittest random failed #28640
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
Others
Describe
adjust signal trigger wait time to fix unittest random failed
单测并行执行时候调度存在不确定性,test_imperative_signal_handler中的单测都是让子进程主动抛出一个signal错误,然后主进程捕获这个错误从而通过验证,但由于进程调度的原因,子进程的执行可能不是马上进行的,这导致,主进程在等待几秒之后结束还没有等到子进程执行抛出错误,所以这个单测偶尔会失败,要进一步减小失败的可能,有两种方法:
这里采取第一种方法修复