Skip to content

Commit

Permalink
fix threadpool test
Browse files Browse the repository at this point in the history
  • Loading branch information
caryoscelus committed Jul 20, 2023
1 parent 260c4e6 commit 51a6eaa
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Test/TestThreadPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ def testExecutionOrder(self):
@pool.wrap
def blocker():
events.append("S")
out = 0
for i in range(10000000):
if i == 3000000:
events.append("M")
out += 1
time.sleep(0.001)
events.append("M")
time.sleep(0.001)
events.append("D")
return out

Expand All @@ -30,9 +28,6 @@ def blocker():

assert events == ["S"] * 3 + ["M"] * 3 + ["D"] * 3

res = blocker()
assert res == 10000000

def testLockBlockingSameThread(self):
lock = ThreadPool.Lock()

Expand Down

0 comments on commit 51a6eaa

Please sign in to comment.