Commit ff9a85b
test: build mockstdio_server with isolated cache to prevent flaky CI (mark3labs#241)
CI occasionally failed with the linker error:
/link: cannot open file DO NOT USE - main build pseudo-cache built
This is most likely because several parallel `go build` invocations
shared the same `$GOCACHE`, letting one job evict the object file
another job had promised the linker. The placeholder path then leaked
through and the build aborted.
This gives each compile its own cache by setting `GOCACHE=$(mktemp -d)`
for the helper’s `go build` call.
After these changes `go test ./... -race` passed 100/100 consecutive
runs locally.1 parent 701927b commit ff9a85b
2 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
0 commit comments