Skip to content

[client] fix WaitStreamConnected test call after ctx signature change#6503

Merged
pappz merged 1 commit into
mainfrom
fix/watchdog-test-waitstreamconnected-ctx
Jun 22, 2026
Merged

[client] fix WaitStreamConnected test call after ctx signature change#6503
pappz merged 1 commit into
mainfrom
fix/watchdog-test-waitstreamconnected-ctx

Conversation

@pappz

@pappz pappz commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

watchdog_test.go called WaitStreamConnected() without the context.Context argument added in #6443, breaking the signal client test build.

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • This change does not modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — OR I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Tests
    • Improved test lifecycle management by tying stream connection waits to test context cancellation and cleanup.

watchdog_test.go called WaitStreamConnected() without the context.Context
argument added in #6443, breaking the signal client test build.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eb1d7d3f-f6a8-4ab3-a810-1d06fa1bdae1

📥 Commits

Reviewing files that changed from the base of the PR and between ac9529e and ac13cec.

📒 Files selected for processing (1)
  • shared/signal/client/watchdog_test.go

📝 Walkthrough

Walkthrough

In TestReceiveProbeRoundTrips, the call to client.WaitStreamConnected() is updated to client.WaitStreamConnected(ctx), passing the test-scoped context so the connection wait is bound to the test's cancellation and cleanup lifecycle.

Changes

Context-aware stream connection wait in watchdog test

Layer / File(s) Summary
Pass ctx to WaitStreamConnected
shared/signal/client/watchdog_test.go
client.WaitStreamConnected() is replaced with client.WaitStreamConnected(ctx) on line 68, threading the test context into the stream-connection wait.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hopped in, context in paw,
"Pass me along," said the ctx with awe.
No more dangling waits in the night,
The test now cancels clean and right.
🐇 One line changed, the stream's delight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main change: updating a test call to WaitStreamConnected to use the new context signature.
Description check ✅ Passed The description provides a clear problem statement, correctly identifies it as a bug fix, and properly documents that no changes modify public APIs or require documentation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/watchdog-test-waitstreamconnected-ctx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pappz pappz merged commit e84f652 into main Jun 22, 2026
42 of 43 checks passed
@pappz pappz deleted the fix/watchdog-test-waitstreamconnected-ctx branch June 22, 2026 13:53
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Release artifacts

Built for PR head ac13cec in workflow run #16082.

Artifact Link
All release artifacts Download
Linux packages Download
Windows packages Download
macOS packages Download
UI artifacts Download
UI macOS artifacts Download

GHCR images (amd64)

No GHCR images were pushed.

This comment is updated by the Release workflow. Artifact links expire according to the workflow retention policy.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants