diff options
Diffstat (limited to 'crates/tests/mqtt_tests/src/test_mqtt_server.rs')
-rw-r--r-- | crates/tests/mqtt_tests/src/test_mqtt_server.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/tests/mqtt_tests/src/test_mqtt_server.rs b/crates/tests/mqtt_tests/src/test_mqtt_server.rs index 188f53ea..0997c181 100644 --- a/crates/tests/mqtt_tests/src/test_mqtt_server.rs +++ b/crates/tests/mqtt_tests/src/test_mqtt_server.rs @@ -50,6 +50,13 @@ impl MqttProcessHandler { ) .await } + + pub fn map_messages_background<F>(&self, func: F) + where + F: 'static + Send + Sync + Fn((String, String)) -> Vec<(String, String)>, + { + tokio::spawn(crate::test_mqtt_client::map_messages_loop(self.port, func)); + } } fn spawn_broker(port: u16) { |