agent-substrate / agent-substrate/substrate

Unit test race: cmd/ateapi/internal/controlapi

Offen
#1,230 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area/tests kind/bug prio/P0
Vorherrschende Sprache
Go
Sterne
1.8k
Forks
316
Ø Merge
2 T. 43 Min.
Gemergte PRs (30 T.)
287

Beschreibung

### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.