From fa0d1a50b5d24c35fc068ed54bb410bbc0039c8f Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sat, 30 Nov 2019 02:07:40 +0100 Subject: [PATCH] Better test of threadpool --- src/Test/TestThreadPool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Test/TestThreadPool.py b/src/Test/TestThreadPool.py index caf4863a..2a67f181 100644 --- a/src/Test/TestThreadPool.py +++ b/src/Test/TestThreadPool.py @@ -16,6 +16,8 @@ class TestThreadPool: events.append("S") out = 0 for i in range(10000000): + if i == 5000000: + events.append("M") out += 1 events.append("D") return out @@ -25,7 +27,7 @@ class TestThreadPool: threads.append(gevent.spawn(blocker)) gevent.joinall(threads) - assert events == ["S"] * 4 + ["D"] * 4 + assert events == ["S"] * 4 + ["M"] * 4 + ["D"] * 4 res = blocker() assert res == 10000000