From 08cf3971a174a94be003ba52e561d2af6660e740 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Tue, 5 Sep 2023 12:36:27 +0100 Subject: [PATCH] Fix integration test. --- tests/concentratord_test.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/concentratord_test.rs b/tests/concentratord_test.rs index 27ace92..0c7c947 100644 --- a/tests/concentratord_test.rs +++ b/tests/concentratord_test.rs @@ -2,10 +2,12 @@ use std::env; use std::io::Cursor; use std::sync::{Arc, Mutex}; use std::thread; +use std::time::Duration; use futures::StreamExt; use paho_mqtt as mqtt; use prost::Message; +use tokio::time::sleep; use chirpstack_api::gw; use chirpstack_mqtt_forwarder::config; @@ -78,6 +80,8 @@ async fn end_to_end() { } }); + // Sleep some time to receive message from MQTT broker. + sleep(Duration::from_millis(100)).await; for _ in 0..stream.len() { stream.next().await.unwrap().unwrap(); }