Skip to content

test(node): propagate server-task JoinResult in client_loopback teardown - #814

Merged
thiras merged 1 commit into
mainfrom
test/client-loopback-propagate-jointask
Jun 4, 2026
Merged

thiras merged 1 commit into
mainfrom
test/client-loopback-propagate-jointask

Conversation

@thiras

@thiras thiras commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #813. Across the client_loopback suite, the teardown awaited the spawned accept-loop task with let _ = server_task.await;, which swallows a panic in the background server task. Switched all sites to server_task.await?; so a panicked background task fails the test.

After server_ep.close().await, the accept loop exits cleanly (returns Ok(())), so ? introduces no false failures — it only surfaces genuine panics. This brings the existing suite in line with the convention adopted in the two-hop test (#813).

Verification

  • cargo fmt -- --check: clean
  • cargo clippy -p decdn-node --tests: no warnings
  • cargo nextest run -p decdn-node --test client_loopback: 18/18 pass

🤖 Generated with Claude Code

Await the spawned accept-loop task with `?` instead of `let _ =` across the
loopback suite so a panic in the background server task fails the test rather
than being silently swallowed. After `close()` the accept loop exits cleanly,
so this only surfaces genuine panics. Follow-up to the same fix in the
two-hop test (#813).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings June 4, 2026 16:07

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates multiple test cases in crates/node/tests/client_loopback.rs to propagate errors from the server_task join handle using server_task.await? instead of silently ignoring them with let _ = server_task.await;. This ensures that any server-side panics or errors during test execution are properly caught and reported, improving test reliability. There are no review comments to address, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the client_loopback integration test suite teardown behavior so that panics in the background server accept-loop task are no longer silently swallowed, aligning the suite with the failure-propagation convention introduced in #813.

Changes:

  • Replace let _ = server_task.await; with server_task.await?; across the client_loopback tests to surface JoinError (notably panics) from the spawned server task.
  • Ensure test failures correctly reflect background-task crashes rather than passing with hidden panics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Coverage report

Total: 87.15% (was 87.15%, ● 0.00%) — 28093/32234 lines

No coverage data for changed Rust files.

History
Commit Total Δ vs base
2475835 (HEAD) 87.15% ● 0.00%

@thiras
thiras merged commit 37f0b9b into main Jun 4, 2026
20 checks passed
@thiras
thiras deleted the test/client-loopback-propagate-jointask branch June 4, 2026 16:13
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