Skip to content

Commit

Permalink
Do not enable tracing_subscriber for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Apr 14, 2024
1 parent afcf44f commit 45c6dae
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn invalid_data_io_error<E: std::error::Error + Send + Sync + 'static>(e: E) ->
#[cfg(feature = "test")]
#[cfg_attr(docsrs, doc(cfg(feature = "test")))]
pub mod tests {
pub use memberlist_core::tests::{next_socket_addr_v4, next_socket_addr_v6, run, AnyError};
pub use memberlist_core::tests::{next_socket_addr_v4, next_socket_addr_v6, AnyError};
pub use paste;

pub use super::serf::base::tests::{serf::*, *};
Expand Down Expand Up @@ -113,4 +113,14 @@ pub mod tests {
.unwrap();
});
}

/// Run the unit test with a given async runtime sequentially.
pub fn run<B, F>(block_on: B, fut: F)
where
B: FnOnce(F) -> F::Output,
F: std::future::Future<Output = ()>,
{
// initialize_tests_tracing();
block_on(fut);
}
}

0 comments on commit 45c6dae

Please sign in to comment.