From e6ec3d02230ec5c753caf56a7d4dba13133710f6 Mon Sep 17 00:00:00 2001 From: Mingwei Zhang Date: Mon, 29 Apr 2024 15:19:07 -0700 Subject: [PATCH] remove unnecessary nats tests these tests should be examples instead --- src/notifier/nats.rs | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/notifier/nats.rs b/src/notifier/nats.rs index 825dbca..17271b4 100644 --- a/src/notifier/nats.rs +++ b/src/notifier/nats.rs @@ -138,36 +138,3 @@ impl NatsNotifier { } } } - -#[cfg(test)] -mod tests { - use super::*; - - async fn send_test_item(notifier: &NatsNotifier) { - let item = BrokerItem { - ts_start: Default::default(), - ts_end: Default::default(), - collector_id: "rrc99".to_string(), - data_type: "rib".to_string(), - url: "https://bgpkit.com".to_string(), - rough_size: 100, - exact_size: 101, - }; - notifier.send(&[item]).await.unwrap(); - } - - #[tokio::test] - async fn test_connection() { - let notifier = NatsNotifier::new(None).await.unwrap(); - dbg!(notifier.client.connection_state()); - send_test_item(¬ifier).await; - } - - #[tokio::test] - async fn test_subscribe() { - let mut notifier = NatsNotifier::new(None).await.unwrap(); - notifier.start_subscription(None).await.unwrap(); - let item: BrokerItem = notifier.next().await.unwrap(); - dbg!(&item); - } -}