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

This commit is contained in:
Fabio Manganiello 2017-12-25 16:20:22 +01:00
parent 96f2d9f496
commit 6e019865bc

View file

@ -1,8 +1,9 @@
from .context import platypush, config_file, TestTimeoutException from .context import platypush, config_file, TestTimeoutException
import logging
import os import os
import sys import sys
import logging import time
import unittest import unittest
from threading import Thread 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 = Daemon(config_file=config_file, requests_to_process=1)
self.receiver.start() self.receiver.start()
time.sleep(1)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()