From 850ec7e47865497b4438ebf617f6a67c0dfb592d Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 2 Sep 2021 17:29:59 +0300 Subject: [PATCH] Try to find what's happening with broadcasts from unknown addresses --- src/tests/core.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/tests/core.py b/src/tests/core.py index 92d66bc0..355d2d48 100644 --- a/src/tests/core.py +++ b/src/tests/core.py @@ -28,7 +28,7 @@ from network.bmproto import BMProto from network.connectionpool import BMConnectionPool from network.node import Node, Peer from network.tcp import Socks4aBMConnection, Socks5BMConnection, TCPConnection -from queues import excQueue +from queues import excQueue, workerQueue from version import softwareVersion from common import cleanup @@ -351,6 +351,18 @@ class TestCore(unittest.TestCase): streams = decoded[7:] self.assertEqual(streams, [1, 2, 3]) + def test_worker_exceptions(self): + """try to provoke an exception in singleWorker""" + for _ in range(5): + helper_sent.insert( + fromAddress='BM-2cXrFSw75fT5FP7qWbM86jpMTSGFBD7uLU', + subject='test subject', + message='test message', + status='broadcastqueued' + ) + workerQueue.put(('sendbroadcast', '')) + time.sleep(5) + def test_insert_method_msgid(self): """Test insert method of helper_sent module with message sending""" fromAddress = 'BM-2cTrmD22fLRrumi3pPLg1ELJ6PdAaTRTdfg'