Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,39 @@ jobs:
river_message_flow_over_freenet_six_peers_five_rounds
-- --ignored --exact

six_peer_connection_cap:
name: six-peer-connection-cap
needs: test_all
runs-on: freenet-default-runner

env:
FREENET_LOG: error
CARGO_TARGET_DIR: ${{ github.workspace }}/target

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v6

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Run six-peer connection-cap test
run: >
cargo test -p freenet
--test connection_cap
--no-default-features
--features trace,websocket,redb,test-network
-- connection_cap_respected --nocapture

clippy_check:
name: Clippy

Expand Down
3 changes: 2 additions & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ opentelemetry_sdk = { optional = true, version = "0.31", features = ["rt-tokio"]
freenet-stdlib = { features = ["net"], workspace = true }
console-subscriber = { version = "0.5.0", optional = true }
tokio-stream = "0.1.17"
freenet-test-network = { version = "0.1.3", optional = true }

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["sysinfoapi"] }
Expand All @@ -91,7 +92,6 @@ arbitrary = { features = ["derive"], version = "1" }
chrono = { features = ["arbitrary"], workspace = true }
freenet-stdlib = { features = ["net", "testing"], workspace = true }
freenet-macros = { path = "../freenet-macros" }
freenet-test-network = "0.1.4"
httptest = "0.16"
statrs = "0.18"
tempfile = "3"
Expand All @@ -111,3 +111,4 @@ trace-ot = ["opentelemetry-jaeger", "trace", "tracing-opentelemetry", "opentelem
websocket = ["axum/ws"]
testing = ["freenet-stdlib/testing"]
console-subscriber = ["dep:console-subscriber"]
test-network = ["dep:freenet-test-network"]
1 change: 1 addition & 0 deletions crates/core/tests/connection_cap.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Minimal repro harness for connection-cap enforcement.
//!
//! This test spins up a tiny network (2 gateways + 6 peers) with a low max-connections
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/diagnose_connectivity.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Diagnostic test to understand connectivity failures

use freenet_test_network::{BuildProfile, FreenetBinary, TestNetwork};
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/gateway_inbound_identity.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Regression test: gateways must register inbound peers under their real identities
//! rather than collapsing multiple connections under a placeholder.
//!
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/large_network.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Large-scale soak test using `freenet-test-network`.
//!
//! This test intentionally spins up a sizable network (2 gateways + N peers) and exercises the
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/manual_network_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Manual test to inspect network logs

use freenet_test_network::{BuildProfile, FreenetBinary, TestNetwork};
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/river_smoke.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Minimal riverctl propagation smoke test to reproduce intermittent "missing contract" errors.
//!
//! This intentionally runs outside CI (ignored) so it can be executed manually when debugging
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/test_network_integration.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "test-network")]
//! Integration test demonstrating freenet-test-network usage
//!
//! This shows how much simpler tests become with the test-network crate
Expand Down
Loading