From a72bacae67f10d100a06bcab0e4bc2be56b16409 Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Thu, 12 Aug 2021 11:38:02 +0200 Subject: [PATCH] test: use proper ignore instead of commenting out --- write_buffer/src/config.rs | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/write_buffer/src/config.rs b/write_buffer/src/config.rs index f176772034..f76d0c50b1 100644 --- a/write_buffer/src/config.rs +++ b/write_buffer/src/config.rs @@ -155,23 +155,28 @@ mod tests { } } - // blocks until https://github.com/influxdata/influxdb_iox/issues/2189 is solved - // #[tokio::test] - // async fn test_reading_kafka() { - // let factory = WriteBufferConfigFactory::new(); + #[tokio::test] + #[ignore = "waits forever to connect until https://github.com/influxdata/influxdb_iox/issues/2189 is solved"] + async fn test_reading_kafka() { + let factory = WriteBufferConfigFactory::new(); - // let server_id = ServerId::try_from(1).unwrap(); + let server_id = ServerId::try_from(1).unwrap(); - // let mut rules = DatabaseRules::new(DatabaseName::new("foo").unwrap()); - // rules.write_buffer_connection = Some(WriteBufferConnection::Reading("test".to_string())); + let mut rules = DatabaseRules::new(DatabaseName::new("foo").unwrap()); + rules.write_buffer_connection = Some(WriteBufferConnection::Reading("test".to_string())); - // if let WriteBufferConfig::Reading(conn) = factory.new_config(server_id, &rules).await.unwrap().unwrap() { - // let conn = conn.lock().await; - // assert_eq!(conn.type_name(), "kafka"); - // } else { - // panic!("not a reading connection"); - // } - // } + if let WriteBufferConfig::Reading(conn) = factory + .new_config(server_id, &rules) + .await + .unwrap() + .unwrap() + { + let conn = conn.lock().await; + assert_eq!(conn.type_name(), "kafka"); + } else { + panic!("not a reading connection"); + } + } #[tokio::test] async fn test_writing_mock() {