[CI] Fix the issue of unit test hanging (#1211)

This commit is contained in:
Ying Sheng
2024-08-25 16:21:37 -07:00
committed by GitHub
parent ab4990e4bf
commit 308d024092
4 changed files with 27 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
import argparse
import glob
import multiprocessing as mp
from sglang.test.test_utils import run_unittest_files
@@ -54,5 +55,10 @@ if __name__ == "__main__":
else:
files = suites[args.suite]
try:
mp.set_start_method("spawn")
except RuntimeError:
pass
exit_code = run_unittest_files(files, args.timeout_per_file)
exit(exit_code)