Tiny add flush for CI crash locating (#15769)

This commit is contained in:
Liangsheng Yin
2025-12-24 22:47:10 +08:00
committed by GitHub
parent 9338f63f7d
commit 159b128357
2 changed files with 11 additions and 5 deletions

View File

@@ -147,9 +147,12 @@ class Envs:
SGLANG_LOG_MS = EnvBool(False)
SGLANG_DISABLE_REQUEST_LOGGING = EnvBool(False)
# Test & Debug
# SGLang CI
SGLANG_IS_IN_CI = EnvBool(False)
SGLANG_IS_IN_CI_AMD = EnvBool(False)
SGLANG_TEST_MAX_RETRY = EnvInt(None)
# Test & Debug
SGLANG_TEST_STUCK_DETOKENIZER = EnvFloat(0)
SGLANG_TEST_STUCK_DP_CONTROLLER = EnvFloat(0)
SGLANG_TEST_STUCK_TOKENIZER = EnvFloat(0)

View File

@@ -1705,16 +1705,19 @@ async def send_concurrent_generate_requests_with_custom_params(
class CustomTestCase(unittest.TestCase):
def _callTestMethod(self, method):
max_retry = int(
os.environ.get("SGLANG_TEST_MAX_RETRY", "1" if is_in_ci() else "0")
)
max_retry = envs.SGLANG_TEST_MAX_RETRY.get()
if max_retry is None:
max_retry = 1 if is_in_ci() else 0
retry(
lambda: super(CustomTestCase, self)._callTestMethod(method),
max_retry=max_retry,
)
def setUp(self):
print(f"[CI Test Method] {self.__class__.__name__}.{self._testMethodName}")
print(
f"[CI Test Method] {self.__class__.__name__}.{self._testMethodName}",
flush=True,
)
def dump_bench_raw_result(