Add river integration tests #32
Open
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.
This pull request adds a comprehensive multi-node integration test for the River contract, improves dependency management, and updates the way the
getrandom
crate is included to ensure compatibility and deduplication. The most significant change is the addition of an integration test that launches multiple nodes, deploys a contract, and checks for state consistency and message propagation across the network.Integration Testing
contracts/room-contract/tests/integration_tests.rs
containing an async test that launches a gateway and three nodes, deploys the River contract, subscribes all nodes, sends messages from each node, and verifies state consistency and message propagation across the network. This test also collects diagnostics and performs detailed error reporting for debugging distributed state issues.Dependency Management
getrandom
dependency incontracts/room-contract/Cargo.toml
from a local explicit version to using the workspace version, ensuring deduplication and consistency across the project.contracts/room-contract/Cargo.toml
, includinganyhow
,freenet
,once_cell
,tempfile
,testresult
,tokio
,tokio-tungstenite
,tracing
, andtracing-subscriber
, to support robust integration testing and diagnostics.Cross-Project Dependency Update
getrandom = { version = "0.2.16", features = ["js"] }
to the rootCargo.toml
to ensure the correct version and features are available for all workspace members, helping prevent version conflicts and supporting WASM targets.