From 5600ffebe1061242bf59546f2c135cfb6ccf2c94 Mon Sep 17 00:00:00 2001 From: AstroQore <69107895+AstroQore@users.noreply.github.com> Date: Mon, 31 Aug 2026 17:27:04 +0800 Subject: [PATCH] Give the delivery fixtures room to start git The 0.2.0 release build failed on one test: a real checkout going from clean to dirty. The error was `.failed("")` -- an empty stderr, because git never ran, it timed out. The fixture helper allowed three seconds for each `git` invocation, and a loaded GitHub runner can spend longer than that just starting /usr/bin/git. The test immediately above it already carries a comment saying exactly this, and already raised its own timeout to ten seconds for the same reason. The shared helper never got the same treatment. Fixture setup now allows thirty seconds, and an empty stderr no longer produces a failure message that says nothing -- it names the command and the likely cause. The 1.5-second bound the product depends on is in GitDeliveryReader and is untouched. --- Tests/AuspexCoreTests/DeliverySnapshotTests.swift | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Tests/AuspexCoreTests/DeliverySnapshotTests.swift b/Tests/AuspexCoreTests/DeliverySnapshotTests.swift index 71888aa..6fcba15 100644 --- a/Tests/AuspexCoreTests/DeliverySnapshotTests.swift +++ b/Tests/AuspexCoreTests/DeliverySnapshotTests.swift @@ -148,12 +148,21 @@ struct DeliverySnapshotTests { #expect(Set(dirty.changedFiles.map(\.path)) == ["tracked.txt", "new.txt"]) } + /// Fixture setup, not a product path: a loaded GitHub runner can spend + /// seconds just starting `/usr/bin/git`, and a timeout here fails with an + /// empty stderr that says nothing about the assertions below. The 1.5-second + /// bound the product actually relies on lives in `GitDeliveryReader`. private func git(_ arguments: [String], in directory: URL) throws { let result = ProcessGitCommandRunner().run( - in: directory, arguments: arguments, timeout: 3, maxOutputBytes: 16 * 1_024 + in: directory, arguments: arguments, timeout: 30, maxOutputBytes: 16 * 1_024 ) guard result.exitCode == 0 else { - throw GitTestError.failed(result.stderr) + throw GitTestError.failed( + result.stderr.isEmpty + ? "git \(arguments.joined(separator: " ")) produced no stderr; " + + "exit \(result.exitCode), most likely the fixture timeout" + : result.stderr + ) } } }