Repository navigation
fix(test): gate cancelled response tests on stdio features - #1365
Open
LucaCiucci wants to merge 1 commit into
Open
LucaCiucci wants to merge 1 commit into
LucaCiucci wants to merge 1 commit into
Conversation
The cancellation response test starts a helper server with `transport::stdio()`, but transport-io is not enabled by default. Declare the server and transport-io requirements so Cargo skips the test when those features are unavailable instead of failing to compile it.
Contributor
|
@bolinfest is on triage rotation this week and is the reviewer for this one. Labels come from the PR labeler. Please review the change. Automated triage. Labels are a first pass and the assigned maintainer has the final say. |
Author
|
I think the automated labels are wrong. |
DaleSeo
reviewed
Oct 15, 2026
Comment on lines
+492
to
+495
| [[test]] | ||
| name = "test_cancelled_response" | ||
| path = "tests/test_cancelled_response.rs" | ||
| required-features = ["server", "transport-io"] |
Member
There was a problem hiding this comment.
Suggested change
| [[test]] | |
| name = "test_cancelled_response" | |
| path = "tests/test_cancelled_response.rs" | |
| required-features = ["server", "transport-io"] | |
| [[test]] | |
| name = "test_cancelled_response" | |
| required-features = ["server"] | |
| path = "tests/test_cancelled_response.rs" |
Gating the entire target on transport-io also skips the three tests here gated on client. They only use duplex and mpsc, and never touch stdio.
// tests/test_cancelled_response.rs
+#[cfg(feature = "transport-io")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn cancelled_request_receives_no_response() -> anyhow::Result<()> {
...
+#[cfg(feature = "transport-io")]
#[tokio::test]
// the HELPER_ENV entry point, serve_helper_stdio, spawn_helper
Member
#1368 will fix that |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Declare
serverandtransport-ioas required features fortest_cancelled_response.Motivation and Context
The test calls
transport::stdio(), buttransport-iois not enabled by default. Without the feature requirement, default-feature test builds fail to compile. Cargo now skips this test when its required features are unavailable.How Has This Been Tested?
cargo testdoes not fail anymore.transport-io.cargo test -p rmcp --test test_cancelled_response --features transport-io: both tests pass.Breaking Changes
None
Types of changes
Checklist
Additional context
N/A