Skip to content

Commit

Permalink
remove the r = Qdrouterd() pattern, use context
Browse files Browse the repository at this point in the history
Make sure a router exits if an initial HTTP listener fails, doesn't hang ... FAIL
/usr/lib64/python3.10/unittest/case.py:613: ResourceWarning: unclosed file <_io.BufferedWriter name=6>
  outcome.errors.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
  • Loading branch information
jiridanek committed May 26, 2022
1 parent caab4b9 commit 102945b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/system_tests_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def test_listen_error(self):
('router', {'mode': 'standalone', 'id': 'bad'}),
('listener', {'port': listen_port, 'maxFrameSize': '2048', 'stripAnnotations': 'no'}),
('listener', {'port': listen_port, 'http': True})])
r = Qdrouterd(name="expect_fail", config=config, wait=False)
self.assertEqual(1, r.wait())
with Qdrouterd(name="expect_fail", config=config, wait=False) as r:
self.assertEqual(1, r.wait())

def is_get_request_failing(self, url, use_ca=True, use_get_cert=False):
try:
Expand Down

0 comments on commit 102945b

Please sign in to comment.