Skip to content

Commit

Permalink
chore(ci): enable routing table test
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Nov 23, 2023
1 parent e43b766 commit ad2207f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ jobs:
log_file_prefix: safe_test_logs_churn
platform: ${{ matrix.os }}

verify_data_location:
verify_data_location_routing_table:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
name: Verify data location
name: Verify data location and Routing Table
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -464,8 +464,8 @@ jobs:
run: cargo build --release --features local-discovery --bin safenode --bin faucet
timeout-minutes: 30

- name: Build data location test
run: cargo test --release -p sn_node --features=local-discovery --test verify_data_location --no-run
- name: Build data location and routing table tests
run: cargo test --release -p sn_node --features=local-discovery --test verify_data_location --test verify_routing_table --no-run
timeout-minutes: 30

- name: Start a local network
Expand All @@ -487,6 +487,10 @@ jobs:
echo "SAFE_PEERS has been set to $SAFE_PEERS"
fi
- name: Verify the routing tables of the nodes
run: cargo test --release -p sn_node --features="local-discovery" --test verify_routing_table -- --nocapture
timeout-minutes: 5

- name: Verify the location of the data on the network (4 * 5 mins)
run: cargo test --release -p sn_node --features="local-discovery" --test verify_data_location -- --nocapture
env:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ jobs:
SLACK_MESSAGE: "Please check the logs for the run at ${{ env.WORKFLOW_URL }}/${{ github.run_id }}"
SLACK_TITLE: "Nightly Churn Test Run Failed"

verify_data_location:
name: Verify data location
verify_data_location_routing_table:
name: Verify data location and Routing Table
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -410,8 +410,8 @@ jobs:
run: cargo build --release --features local-discovery --bin safenode --bin faucet
timeout-minutes: 30

- name: Build data location test
run: cargo test --release -p sn_node --features=local-discovery --test verify_data_location --no-run
- name: Build data location and routing table tests
run: cargo test --release -p sn_node --features=local-discovery --test verify_data_location --test verify_routing_table --no-run
timeout-minutes: 30

- name: Start a local network
Expand All @@ -423,6 +423,10 @@ jobs:
faucet-path: target/release/faucet
platform: ${{ matrix.os }}

- name: Verify the Routing table of the nodes
run: cargo test --release -p sn_node --features="local-discovery" --test verify_routing_table -- --nocapture
timeout-minutes: 5

- name: Verify the location of the data on the network (approx 12 * 5 mins)
run: cargo test --release -p sn_node --features="local-discovery" --test verify_data_location -- --nocapture
env:
Expand Down
4 changes: 2 additions & 2 deletions sn_node/tests/verify_routing_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use std::{
use tonic::Request;

#[tokio::test(flavor = "multi_thread")]
async fn verify_routing_tables() -> Result<()> {
let _log_appender_guard = LogBuilder::init_multi_threaded_tokio_test("routing_table");
async fn verify_routing_table() -> Result<()> {
let _log_appender_guard = LogBuilder::init_multi_threaded_tokio_test("verify_routing_table");

let all_peers = get_all_peer_ids().await?;
let mut all_failed_list = HashMap::new();
Expand Down

0 comments on commit ad2207f

Please sign in to comment.