agent-substrate / agent-substrate/substrate

Unit test race: cmd/ateapi/internal/controlapi

Aberta
#1,230 2 comentários 0 reações 0 responsáveis Ver no GitHub
area/tests kind/bug prio/P0
Linguagem predominante
Go
Estrelas
1.8k
Forks
316
Merge médio
2d 43min
PRs com merge (30d)
287

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.