Skip to content

Commit

Permalink
Join the queue thread after closing it in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalresistor committed Jan 17, 2022
1 parent 2e21388 commit 9db3506
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ def stop_subprocess(self):
self.proc.terminate()
self.sock.close()
# This give us one FD back ...
self.queue.close()
self.proc.join()
self.proc.close()
self.queue.close()
self.queue.join_thread()

# The following is for the benefit of PyPy 3, for some reason it is
# holding on to some resources way longer than necessary causing tests
Expand All @@ -109,6 +110,7 @@ def stop_subprocess(self):
# increase the limits before running tests, this works as well and
# means we don't need to remember to do that.
import gc

gc.collect()

def assertline(self, line, status, reason, version):
Expand Down

0 comments on commit 9db3506

Please sign in to comment.