aboutsummaryrefslogtreecommitdiff
path: root/test/functional/zmq_test.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-06-07 23:30:52 -0400
committerJohn Newbery <john@johnnewbery.com>2017-06-12 09:17:18 -0400
commit7c51e9f0dc67d8187051071e15ac9c649ea90c65 (patch)
tree9b59ab0882107d62548894260c52332190c2606c /test/functional/zmq_test.py
parentb1bac1cb7ea1560b46ff758864660a21a228ed67 (diff)
[tests] destroy zmq context in zmq_tests.py
Diffstat (limited to 'test/functional/zmq_test.py')
-rwxr-xr-xtest/functional/zmq_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/zmq_test.py b/test/functional/zmq_test.py
index c1ffecc77b..26c946d215 100755
--- a/test/functional/zmq_test.py
+++ b/test/functional/zmq_test.py
@@ -45,6 +45,14 @@ class ZMQTest (BitcoinTestFramework):
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
def run_test(self):
+ try:
+ self._zmq_test()
+ finally:
+ # Destroy the zmq context
+ self.log.debug("Destroying zmq context")
+ self.zmqContext.destroy(linger=None)
+
+ def _zmq_test(self):
genhashes = self.nodes[0].generate(1)
self.sync_all()