Follow-up to the store-test fix (c4233e3, v0.33.2). That fix replaced 54000 + os.Getpid()%1000 in internal/adapters/store/store_test.go with an OS-assigned port after run 9563 failed with embedded-postgres start: process already listening on port 54000 (a concurrent job on the shared runner held it).
Two more places use the same PID-derived scheme and can fail the same way:
Fix the same way: ask the OS (net.Listen(":0"), read the port, close) and retry Start a couple of times with a fresh port; reuse the freePort() / startTestPostgres helper from the store package if it can be shared without an import cycle, else keep a small copy. Test first: pre-bind the port the old scheme would pick and assert the suite still starts.
Follow-up to the store-test fix (c4233e3, v0.33.2). That fix replaced `54000 + os.Getpid()%1000` in `internal/adapters/store/store_test.go` with an OS-assigned port after run 9563 failed with `embedded-postgres start: process already listening on port 54000` (a concurrent job on the shared runner held it).
Two more places use the same PID-derived scheme and can fail the same way:
- `internal/web/handlers_test.go:34`
- `cmd/tapir/e2e_upload_test.go:53` (`55000 + pid%1000`)
Fix the same way: ask the OS (`net.Listen(":0")`, read the port, close) and retry `Start` a couple of times with a fresh port; reuse the `freePort()` / `startTestPostgres` helper from the store package if it can be shared without an import cycle, else keep a small copy. Test first: pre-bind the port the old scheme would pick and assert the suite still starts.
risk/low.
---
_Created via git-mcp on behalf of @mathias_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to the store-test fix (
c4233e3, v0.33.2). That fix replaced54000 + os.Getpid()%1000ininternal/adapters/store/store_test.gowith an OS-assigned port after run 9563 failed withembedded-postgres start: process already listening on port 54000(a concurrent job on the shared runner held it).Two more places use the same PID-derived scheme and can fail the same way:
internal/web/handlers_test.go:34cmd/tapir/e2e_upload_test.go:53(55000 + pid%1000)Fix the same way: ask the OS (
net.Listen(":0"), read the port, close) and retryStarta couple of times with a fresh port; reuse thefreePort()/startTestPostgreshelper from the store package if it can be shared without an import cycle, else keep a small copy. Test first: pre-bind the port the old scheme would pick and assert the suite still starts.risk/low.
Created via git-mcp on behalf of @mathias