summaryrefslogtreecommitdiffstats
path: root/vendor/tracing/tests/no_subscriber.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/tracing/tests/no_subscriber.rs')
-rw-r--r--vendor/tracing/tests/no_subscriber.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/tracing/tests/no_subscriber.rs b/vendor/tracing/tests/no_subscriber.rs
index 5f927c1de..d15a2c8a1 100644
--- a/vendor/tracing/tests/no_subscriber.rs
+++ b/vendor/tracing/tests/no_subscriber.rs
@@ -1,14 +1,15 @@
#![cfg(feature = "std")]
-use tracing::subscriber::{self, NoSubscriber};
+use tracing_mock::subscriber;
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
#[test]
fn no_subscriber_disables_global() {
// Reproduces https://github.com/tokio-rs/tracing/issues/1999
- let (subscriber, handle) = tracing_mock::subscriber::mock().done().run_with_handle();
- subscriber::set_global_default(subscriber).expect("setting global default must succeed");
- subscriber::with_default(NoSubscriber::default(), || {
+ let (subscriber, handle) = subscriber::mock().only().run_with_handle();
+ tracing::subscriber::set_global_default(subscriber)
+ .expect("setting global default must succeed");
+ tracing::subscriber::with_default(tracing::subscriber::NoSubscriber::default(), || {
tracing::info!("this should not be recorded");
});
handle.assert_finished();