agent-substrate / agent-substrate/substrate
Unit test race: cmd/ateapi/internal/controlapi
- Langage dominant
- Go
- Étoiles
- 1.8k
- Forks
- 316
- Merge moyen
- 2 j 43 min
- PR mergées (30 j)
- 287
Description
### Agent reported `go test -race` failure
Transient Failure: Testcontainer Database Connection Drop under Load
Failing Package: github.com/agent-substrate/substrate/cmd/ateapi/internal/controlapi
### Symptoms
```
storetest.go:74: dropping PostgreSQL test database: conn closed
workflow_suspend_test.go:211: creating PostgreSQL test database: failed to connect to `user=postgres database=postgres`:
127.0.0.1:32781 (localhost): failed to receive message: read tcp 127.0.0.1:...->127.0.0.1:32781: read:
connection reset by peer
```
### Potential Root Cause (need verification)
When go test -race ./... executes every package concurrently, multiple packages spin up Docker PostgreSQL containers and create/drop dozens of databases in parallel via storetest.go:51-78.
Under the high CPU/memory overhead of the race detector, the Docker container port/connection dropped mid-suite, causing subsequent subtests to fail with connection reset / refused errors.
When tested individually (go test -race ./cmd/ateapi/...), all tests in controlapi pass cleanly with zero race warnings.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.