Skip to content

test(network): ack NATS messages before signalling test completion (backport) - #4489

Merged
stevenvegt merged 1 commit into
V6.2from
V6_2/backport-nats-ack-fix
Sep 9, 2026
Merged

test(network): ack NATS messages before signalling test completion (backport)#4489
stevenvegt merged 1 commit into
V6.2from
V6_2/backport-nats-ack-fix

Conversation

@stevenvegt

Copy link
Copy Markdown
Member

Backport of #4488 to V6.2. See that PR for the analysis. Cherry-picked without conflicts; verified with go test -race on the affected packages.

TestNetwork_Reprocess called wg.Done() before msg.Ack(). Once Done
released the test, its cleanup shut down the embedded NATS server, and
the ack on the callback goroutine failed with "nats: connection closed"
on slow CI runners.

Also stop calling require inside NATS callback goroutines (FailNow must
run on the test goroutine) and read the ack error in the events
integration test under the mutex instead of through a shared variable.

Assisted-by: AI
(cherry picked from commit 17fcac4)
@qltysh

qltysh Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@stevenvegt
stevenvegt merged commit 3e5cfe8 into V6.2 Sep 9, 2026
8 of 9 checks passed
@stevenvegt
stevenvegt deleted the V6_2/backport-nats-ack-fix branch September 9, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants