test(jetsocat): replace flaky socks5_to_jmux proptest with deterministic CLI test#1718
Conversation
…tic CLI test The proptest-based integration test was flaky on both Linux and Windows CI: - External network call to rust-lang.org:80 failed when the server returned an unexpected HTTP response (e.g. redirect without HTML body) - Same ports rebound 32 times per run risked TIME_WAIT races Replace with two deterministic rstest cases (TCP and WebSocket) in the testsuite CLI suite. The new test spawns real jetsocat subprocesses and uses an in-process tokio echo server, with no external network dependency.
There was a problem hiding this comment.
Pull request overview
This PR migrates the SOCKS5→JMUX end-to-end test coverage from the jetsocat crate’s (removed) proptest-based integration test into the workspace testsuite CLI test harness, and cleans up jetsocat’s test-only dependencies accordingly.
Changes:
- Added a new
testsuiteasync CLI test that validates SOCKS5 listener → JMUX tunnel → TCP echo server (TCP and WebSocket variants). - Added
proxy-socksas atestsuitedev-dependency to drive a SOCKS5 client in the new test. - Removed the old
jetsocatintegration test and droppedjetsocat’s dev-dependencies previously used only by that test.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testsuite/tests/cli/jetsocat.rs | Adds new async SOCKS5→JMUX tunnel test using spawned jetsocat processes. |
| testsuite/Cargo.toml | Adds proxy-socks dev-dependency for the new test. |
| jetsocat/tests/socks5-to-jmux.rs | Removes old proptest-based integration test (now covered in testsuite). |
| jetsocat/src/lib.rs | Removes test-only forced-link imports (no longer needed after deleting the integration test). |
| jetsocat/Cargo.toml | Removes dev-dependencies tied to the deleted integration test. |
| Cargo.lock | Updates lockfile to reflect dependency removals/additions. |
Comments suppressed due to low confidence (1)
jetsocat/Cargo.toml:84
- This PR removes
proptest/test-utilsfrom jetsocat'sdev-dependencies, butjetsocat/src/main.rsstill has#[cfg(test)] use {proptest as _, test_utils as _};(line ~27).cargo test -p jetsocatwill fail to compile unless that import is removed or the dev-dependencies are kept.
"Win32_Security_Credentials",
"Win32_Globalization",
]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR replaces a flaky proptest-based socks5_to_jmux integration test in jetsocat with deterministic CLI-driven tests in the testsuite, eliminating external network dependency and reducing port-rebind/TIME_WAIT flakiness in CI.
Changes:
- Added a deterministic
socks5_to_jmuxCLI integration test (parameterized for TCP vs WebSocket) that spawns realjetsocatsubprocesses and uses an in-process Tokio TCP echo server. - Introduced a new
wait_for_port_boundhelper to detect single-accept listeners being ready without consuming their one connection slot. - Removed the old
jetsocatproptest integration test and relatedjetsocatdev-dependencies/imports.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| testsuite/tests/cli/jetsocat.rs | Adds deterministic SOCKS5→JMUX→echo round-trip test covering TCP and WS pipes via real subprocesses. |
| testsuite/src/cli.rs | Adds wait_for_port_bound helper for readiness checks without connecting. |
| testsuite/Cargo.toml | Adds proxy-socks as a dev-dependency for the new CLI test. |
| jetsocat/tests/socks5-to-jmux.rs | Removes flaky proptest-based integration test that relied on external network and repeated port rebinds. |
| jetsocat/src/main.rs | Removes test-only force-link imports tied to the removed proptest test/dev-deps. |
| jetsocat/src/lib.rs | Removes test-only force-link imports tied to the removed proptest test/dev-deps. |
| jetsocat/Cargo.toml | Removes now-unused dev-dependencies (proptest, test-utils, tokio) previously required only by the removed test. |
| Cargo.lock | Updates dependency graph to reflect removed jetsocat dev-deps and added testsuite dev-dep. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
The proptest-based integration test was flaky on both Linux and Windows CI:
Replace with two deterministic rstest cases (TCP and WebSocket) in the testsuite CLI suite. The new test spawns real jetsocat subprocesses and uses an in-process tokio echo server, with no external network dependency.