Skip to content

test: TestConfigChannel_PutIsIdempotentAndASecondNameIsRefused flakes with connection reset #798

Closed

Description

@scttfrdmn

Observed once during v0.111.0 PR 1 verification, under make coverage (go test -race -coverprofile=... ./...) on go1.26.6/darwin:

--- FAIL: TestConfigChannel_PutIsIdempotentAndASecondNameIsRefused (5.19s)
    configservice_channel_test.go:426: POST PutConfigurationRecorder: Post "http://localhost:59492/":
      read tcp [::1]:59530->[::1]:59492: read: connection reset by peer

The subtest took 5.19s, which is far longer than its siblings, so the reset looks like a
timeout or a server the test had already torn down rather than a protocol error. Re-running
make coverage unchanged passed, and make test passed on both go1.27.1 and go1.26.6 before
and after.

Nothing in the PR touches ConfigService or the test harness.

Why this is worth an issue rather than a re-run

Substrate's premise is that a red test is a real signal, not timing noise — CLAUDE.md says no
test may depend on network access or wall-clock time, and doc.go sells "no test flakes" as the
payoff over container-backed approaches. A test that fails once in N runs against its own
httptest server undermines that claim more than the ConfigService behaviour it covers is worth.

Acceptance criteria

  • The mechanism is identified — whether the client outlives the server, the 5s duration is a
    real timeout, or the test shares a server with a sibling that shuts it down.
  • The test passes deterministically, with no wall-clock or port-reuse dependence.
  • If the same shape exists in sibling tests in the file, they are fixed with it.

Activity

  1. added this to the v0.111.0 milestone on Sep 11, 2026
  2. added
    type: bug
    on Sep 11, 2026
  3. modified the milestones: v0.111.0, v0.112.0 on Sep 11, 2026
  4. scttfrdmn commented on Sep 11, 2026

    @scttfrdmn
    OwnerAuthor

    Moved to v0.112.0. v0.111.0 shipped without touching this: the flake is in AWS Config's channel test and nothing in the authorization triad (#770/#771/#762) goes near it, so the analysis in the issue body stands unchanged. It did not reproduce in any of this release's runs — make test and GOTOOLCHAIN=go1.26.6 make test were green locally on every PR, and all four release CI runs passed — which is consistent with an intermittent connection reset rather than evidence against it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions