Development record
Two tests' 'origin that would hang' never hung: TestThePromptHookShowsEachAnnouncementOnce (internal/surface/cli/status_hook_test.go) and TestThePromptNeverWaitsOnTheNetwork (internal/core/claim/status_test.go) set origin to 'ext::sh -c sleep\ 30', but git-remote-ext escapes a space only as '% ', so git ran sh -c 'sleep\' 30, and sleep printed its usage and exited at once. A network call from the code under test would have failed fast instead of hanging, and a call that fails fast beats the clock too, so the hook test's no-network claim was not checked at all; the claim test's trace of git's subcommands covered only git run through its traced helper.
Two tests' 'origin that would hang' never hung: TestThePromptHookShowsEachAnnouncementOnce (internal/surface/cli/status_hook_test.go) and TestThePromptNeverWaitsOnTheNetwork (internal/core/claim/status_test.go) set origin to 'ext::sh -c sleep\ 30', but git-remote-ext escapes a space only as '% ', so git ran sh -c 'sleep' 30, and sleep printed its usage and exited at once. A network call from the code under test would have failed fast instead of hanging, and a call that fails fast beats the clock too, so the hook test's no-network claim was not checked at all; the claim test's trace of git's subcommands covered only git run through its traced helper.
Frontmatter
| id | iss-2610181122454939 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610181122454939-two-tests-origin-that-would-hang-never.md
open on GitHub ↗ · commit history ↗