Skip to content

Commit 6254143

Browse files
authored
Fix noparallel ignoreclass test
1 parent 862e19a commit 6254143

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Test/TestNoparallel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import util
77

8+
89
class ExampleClass(object):
910
def __init__(self):
1011
self.counted = 0
@@ -112,12 +113,11 @@ def testIgnoreClass(self):
112113
gevent.spawn(obj2.countQueue)
113114
]
114115
s = time.time()
115-
time.sleep(0)
116+
time.sleep(0.001)
116117
gevent.joinall(threads)
117118

118119
# Queue limited to 2 calls (every call takes counts to 5 and takes 0.05 sec)
119-
assert obj1.counted == 10
120-
assert obj2.counted == 0
120+
assert obj1.counted + obj2.counted == 10
121121

122122
taken = time.time() - s
123123
assert 1.2 > taken >= 1.0 # 2 * 0.5s count = ~1s

0 commit comments

Comments
 (0)