Spend less of make test writing the image and waiting (closes #56)
check / check (push) Failing after 45s
check / check (push) Failing after 45s
The test phase spends most of its time compiling with the race detector from an empty build cache; then come writing the test image and the internal/proxy tests. - Go's build cache is on a tmpfs in the test phase, so its 137 MB are no longer written into the test image. - TestUpgradedConnectionOutlastsTheTimeouts waits until just past shortTimeout after the answer to the upgrade was read, by when every timeout has started, rather than 7.5 s, so it ends with the other timing tests. - shortTimeout is written as waitLimit / 2, as its comment says it is. Model: opus-5-5
This commit was merged in pull request #59.
This commit is contained in:
+4
-1
@@ -29,7 +29,10 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go test -count=1 -timeout 90s -race -cover ./... || \
|
||||
# Go's build cache is kept on a tmpfs, out of the image: nothing uses it
|
||||
# after this step, and writing it into the image takes seconds.
|
||||
RUN --mount=type=tmpfs,target=/root/.cache/go-build \
|
||||
go test -count=1 -timeout 90s -race -cover ./... || \
|
||||
{ echo "--- Rerunning with -v for details ---"; \
|
||||
go test -count=1 -timeout 90s -race -v ./...; exit 1; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user