From 6e019865bcf99f831f44a5d49787272275dfee7b Mon Sep 17 00:00:00 2001
From: Fabio Manganiello <blacklight86@gmail.com>
Date: Mon, 25 Dec 2017 16:20:22 +0100
Subject: [PATCH] Placed a sleep to let all the messages be received before
 stopping everything (TODO: make sure that all the threads are synchronized on
 receive_msg and stop

---
 tests/test_local.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/test_local.py b/tests/test_local.py
index bf0956909..bde24c05e 100644
--- a/tests/test_local.py
+++ b/tests/test_local.py
@@ -1,8 +1,9 @@
 from .context import platypush, config_file, TestTimeoutException
 
+import logging
 import os
 import sys
-import logging
+import time
 import unittest
 
 from threading import Thread
@@ -69,6 +70,8 @@ class TestLocal(unittest.TestCase):
         self.receiver = Daemon(config_file=config_file, requests_to_process=1)
         self.receiver.start()
 
+        time.sleep(1)
+
 
 if __name__ == '__main__':
     unittest.main()