router
router copied to clipboard
Logs are not captured (hidden) for passing tests
Part of the current output for cargo test --all:
Running unittests src/main.rs (target/debug/deps/jwt_auth-2685b1c10b4305b5)
running 8 tests
......2022-08-23T11:42:20.216299Z INFO apollo_router::router_factory: list of plugins plugin_details=[("experimental.include_subgraph_errors", "apollo_router::plugins::include_subgraph_errors::IncludeSubgraphErrors"), ("apollo.csrf", "apollo_router::plugins::csrf::Csrf"), ("apollo.telemetry", "apollo_router::plugins::telemetry::Telemetry"), ("example.jwt", "jwt_auth::jwt::JwtAuth"), ("extra_plugins.0.apollo_router::test_harness::SubgraphServicePlugin<apollo_router::test_harness::TestHarness::build::{{closure}}::{{closure}}>", "apollo_router::test_harness::SubgraphServicePlugin<apollo_router::test_harness::TestHarness::build::{{closure}}::{{closure}}>"), ("extra_plugins.1.apollo_router::test_harness::SubgraphServicePlugin<apollo_router::test_harness::TestHarness::build::{{closure}}::{{closure}}>", "apollo_router::test_harness::SubgraphServicePlugin<apollo_router::test_harness::TestHarness::build::{{closure}}::{{closure}}>")]
..
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.02s
Since --nocapture was not used, output from tests should have been captured and only shown for failing tests. Capturing is based on a thread-local internal to the Rust standard library. Is logging printed from a different thread than emitted it? Can we find some way to make passing tests less noisy?