agent-substrate / agent-substrate/substrate

Unit test race: cmd/ateapi/internal/controlapi

オープン
#1,230 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area/tests kind/bug prio/P0
主要言語
Go
スター
1.8k
フォーク
316
平均マージ
2日 43分
マージ済み PR(30日)
287

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。