Skip to content

Commit a862fc9

Browse files
committed
test: add test_log annotation to capture execution logs for issue #2023
This change annotates test_small_network_get_failure with test_log to capture test execution logs in CI. The test passes locally but fails in CI, and these logs will help us debug the issue. Changes: - Add test-log 0.2 to dev-dependencies in freenet-ping-app - Replace manual logger setup with #[test_log::test] attribute - Remove unused LevelFilter import - Logs will now be captured and displayed on test failure This will help us understand what's happening during CI test execution and identify the root cause of issue #2023.
1 parent e5c49f5 commit a862fc9

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

apps/freenet-ping/Cargo.lock

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/freenet-ping/app/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ humantime = "2.2.0"
2525

2626
[dev-dependencies]
2727
freenet = { path = "../../../crates/core" }
28+
test-log = "0.2"
2829
testresult = { workspace = true }
2930

3031
[lib]

apps/freenet-ping/app/tests/test_small_network_get_issue.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ use futures::FutureExt;
1313
use testresult::TestResult;
1414
use tokio::{select, time::timeout};
1515
use tokio_tungstenite::connect_async;
16-
use tracing::{level_filters::LevelFilter, span, Instrument, Level};
16+
use tracing::{span, Instrument, Level};
1717

1818
use common::{base_node_test_config, gw_config_from_path, APP_TAG, PACKAGE_DIR, PATH_TO_CONTRACT};
1919

20-
#[tokio::test(flavor = "multi_thread")]
20+
#[test_log::test(tokio::test(flavor = "multi_thread"))]
2121
async fn test_small_network_get_failure() -> TestResult {
22-
freenet::config::set_logger(Some(LevelFilter::INFO), None);
2322

2423
const NUM_GATEWAYS: usize = 1;
2524
const NUM_NODES: usize = 3;

0 commit comments

Comments
 (0)