From 0414e020515d89cd7de0a38eef20bb7592e4289c Mon Sep 17 00:00:00 2001
From: Andreas Motl <andreas@getkotori.org>
Date: Sun, 28 Nov 2021 02:23:51 +0100
Subject: [PATCH] Attempt to fix flakey `test_airrohr_http_json`

---
 test/test_airrohr.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test_airrohr.py b/test/test_airrohr.py
index aae11ed..4950bd5 100644
--- a/test/test_airrohr.py
+++ b/test/test_airrohr.py
@@ -81,6 +81,11 @@ def test_airrohr_http_json(machinery_basic, create_influxdb, reset_influxdb):
     and proof it is stored in the InfluxDB database.
     """
 
+    # Wait for some time to let the machinery spin up.
+    yield sleep(PROCESS_DELAY_MQTT)
+    yield sleep(PROCESS_DELAY_MQTT)
+    yield sleep(PROCESS_DELAY_MQTT)
+
     # Submit a single measurement, without timestamp.
     yield threads.deferToThread(http_json_sensor, settings.channel_path_airrohr, data_in)