Skip to content

Commit c6c86e8

Browse files
fix(cli): prevent false test skips for intentional error scenarios
Refined network retry logic to distinguish between transient infrastructure failures and intentional test errors, preventing incorrect test skips in JUnit validation scenarios. 1. Network Error Detection (utils.ts) - Renamed `hasNetworkError` → `hasLowLevelNetworkError` for clarity - Removed REQUEST_ERROR from retry patterns (too generic, matches intentional bad URLs) - Now only retries on unambiguous TCP/DNS errors: ECONNRESET, EAI_AGAIN, ENOTFOUND, ETIMEDOUT, ECONNREFUSED - Preserved TEST_SCRIPT_ERROR detection when concurrent with REQUEST_ERROR (the actual CI failure mode from undefined response objects) - Added comprehensive JSDoc explaining when to use vs plain runCLI 2. JUnit XML Validation (test.spec.ts, 4 locations) - Removed REQUEST_ERROR and TEST_SCRIPT_ERROR from XML retry patterns - Only retry when low-level errors corrupt XML structure - Prevents skipping tests with intentional errors in collections (test-junit-report-export-coll.json has intentional invalid-url and script reference errors for validation) 3. Test Corrections - Fixed: "Fails to display console logs..." test now uses plain runCLI (test expects errors from legacy sandbox, shouldn't use retry) - Added: Environment version tests (v0, v1, v2) now use runCLIWithNetworkRetry (use echo.hoppscotch.io, expect success, benefit from retry) - Removed: Obsolete SKIP_EXTERNAL_TESTS env var check (retry logic handles this)
1 parent 9f703c9 commit c6c86e8

File tree

2 files changed

+205
-202
lines changed

2 files changed

+205
-202
lines changed

0 commit comments

Comments
 (0)