Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to stabilize the Windows upgrade-check related tests by preventing cross-test interference from shared environment variables during parallel test execution.
Changes:
- Mark affected unit tests as serial to avoid parallel env var mutation.
- Update the upgrade check test to prefer
STELLAR_DATA_HOME(higher priority and cross-platform) and to clearXDG_DATA_HOME. - Add
serial_testas a dev-dependency (and updateCargo.lockaccordingly).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/soroban-cli/src/config/upgrade_check.rs | Makes the upgrade check load/save test run serially and uses STELLAR_DATA_HOME for deterministic temp dir resolution. |
| cmd/soroban-cli/src/config/data.rs | Makes the write/read cache test run serially to reduce env var test interference. |
| cmd/soroban-cli/Cargo.toml | Adds serial_test under dev-dependencies to support serial test execution. |
| Cargo.lock | Locks the new serial_test dependency. |
Comments suppressed due to low confidence (1)
cmd/soroban-cli/src/config/data.rs:212
STELLAR_DATA_HOMEis set for the test but never restored/removed afterward, which can leak into other tests and cause order-dependent failures. Save the original value at the start of the test and restore it at the end (or remove it if it was unset). Also,set_varcan take anOsStr, so you can avoidto_str().unwrap()by passing thePathdirectly to prevent a potential panic on non-UTF8 paths.
fn test_write_read() {
let t = assert_fs::TempDir::new().unwrap();
std::env::set_var("STELLAR_DATA_HOME", t.path().to_str().unwrap());
let rpc_uri = Url::from_str("http://localhost:8000").unwrap();
mootz12
approved these changes
Apr 13, 2026
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.
No description provided.