From 6254143fc6eb4d52fdbe64dc41f957e72a50159f Mon Sep 17 00:00:00 2001 From: ZeroNet Date: Tue, 11 Jun 2019 18:24:44 +0200 Subject: [PATCH] Fix noparallel ignoreclass test --- src/Test/TestNoparallel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Test/TestNoparallel.py b/src/Test/TestNoparallel.py index 79b62f63..5a1320d3 100644 --- a/src/Test/TestNoparallel.py +++ b/src/Test/TestNoparallel.py @@ -5,6 +5,7 @@ import pytest import util + class ExampleClass(object): def __init__(self): self.counted = 0 @@ -112,12 +113,11 @@ class TestNoparallel: gevent.spawn(obj2.countQueue) ] s = time.time() - time.sleep(0) + time.sleep(0.001) gevent.joinall(threads) # Queue limited to 2 calls (every call takes counts to 5 and takes 0.05 sec) - assert obj1.counted == 10 - assert obj2.counted == 0 + assert obj1.counted + obj2.counted == 10 taken = time.time() - s assert 1.2 > taken >= 1.0 # 2 * 0.5s count = ~1s