Skip to content

Commit a2242e1

Browse files
committed
test(test-impact): the Git fixture waits for Git, no quiet timeout decides
The Git facts fixture ran every Git command with a 10 s quiet timeout. The diff-driver controls run `git diff --ext-diff` / `--textconv` with a fresh copy of the test runner as the driver; on a loaded host that copy takes over 10 s to start and finish, Git prints nothing meanwhile, and the timeout killed it (outcome HANG). test-windows (x86_64) failed test_git_ancestor_changes_history_and_external_driver_guards_apply that way (controls[0]), and locally 12 concurrent runs of that test failed 8 times, every failure HANG at ~10,020 ms. Without the quiet timeout the same run failed 0 of 12. The fixture now waits for Git to finish; the suite's own ceiling stays the backstop. No fixture caller expects a hang. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 962d5b9 commit a2242e1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎tests/test_test_impact_git.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,16 @@ static bool gf_git_exit(gf_fixture_t *fx, const char *const *tail, int expected_
120120
argv[n++] = tail[i];
121121
}
122122
argv[n] = NULL;
123+
/* No quiet timeout: the fixture waits for Git to finish, and the suite's
124+
* own ceiling is the backstop. A diff-driver control runs a fresh copy of
125+
* the test runner under `git diff`; on a loaded or Windows host that copy
126+
* took over 10 s to start and finish, and a 10 s quiet timeout killed Git
127+
* (outcome HANG) -- the timeout, not the assertion, decided the test. */
123128
cbm_proc_opts_t opts = {.bin = fx->git,
124129
.argv = argv,
125130
.stdout_file = fx->capture,
126131
.log_file = fx->log,
127-
.strip_git_repo_env = true,
128-
.quiet_timeout_ms = 10000};
132+
.strip_git_repo_env = true};
129133
cbm_proc_result_t result = {0};
130134
cbm_proc_outcome_t expected_outcome =
131135
expected_exit == 0 ? CBM_PROC_CLEAN : CBM_PROC_EXIT_NONZERO;

0 commit comments

Comments
 (0)