Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Aug 30, 2022
1 parent 58e1bb9 commit 45c477e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tracing-core/src/dispatcher.rs
Expand Up @@ -180,7 +180,11 @@ static GLOBAL_DEFAULT_DISPATCH: Lazy<std::sync::atomic::AtomicPtr<Dispatch>> =
Lazy::new(|| std::sync::atomic::AtomicPtr::new(unsafe { &mut *NO_DISPATCH as *mut _ }));

// This is only `mut` to make it work as default value of [`GLOBAL_DEFAULT_DISPATCH`].
static mut NO_DISPATCH: Lazy<Dispatch> = Lazy::new(|| Dispatch::new(NoSubscriber::default()));
//
// We can not use `new` as we don't want this to be registered at the callsites.
static mut NO_DISPATCH: Lazy<Dispatch> = Lazy::new(|| Dispatch {
subscriber: Arc::new(NoSubscriber::default()),
});

/// The dispatch state of a thread.
#[cfg(feature = "std")]
Expand Down
Expand Up @@ -61,7 +61,7 @@ impl Subscriber for TestSubscriber {
}

#[test]
fn normalized_metadata() {
fn interests_cache_works() {
LogTracer::builder()
.with_interest_cache(tracing_log::InterestCacheConfig::default())
.init()
Expand Down

0 comments on commit 45c477e

Please sign in to comment.