grs commented on a change in pull request #740:
URL: https://github.com/apache/qpid-dispatch/pull/740#discussion_r427878367
##########
File path: tests/system_tests_http.py.in
##########
@@ -101,23 +105,37 @@ class RouterTestHttp(TestCase):
http_delete_listen_port = self.get_port()
config = Qdrouterd.Config([
('router', {'mode': 'standalone', 'id': 'A'}),
- ('listener', {'port': normal_listen_port, 'maxFrameSize': '2048',
'stripAnnotations': 'no'}),
- ('listener', {'name': name, 'port': http_delete_listen_port,
'http': True})])
+ ('listener', {'port': normal_listen_port}),
+ ('listener', {'httpRootDir': os.path.dirname(__file__), 'name':
name, 'port': http_delete_listen_port, 'http': True})])
router = self.qdrouterd(name="expect_fail_1", config=config, wait=True)
- exception_occurred = False
def address():
return router.addresses[0]
+ # Perform a GET request on the http_delete_listen_port just to make
+ # sure that it is up and running.
+ url = "%s/system_tests_http.txt" % "http://localhost:%d" %
http_delete_listen_port
+ out = self.get(url, use_ca=False)
+
long_type = 'org.apache.qpid.dispatch.listener'
- delete_command = 'DELETE --type=' + long_type + ' --name=' + name
+ mgmt = QdManager(self, address=address())
+ mgmt.delete(long_type, name=name)
+
+ # Wait for 2 seconds for the router to delete the listener
+ # This is required in slower systems running this test.
+ # Once again try to perform a GET request. Now since the listener
+ # is gone, the GET will fail.
+ sleep(5)
Review comment:
It would be good to have another test that has multiple http listeners,
deletes one of them and ensures the remaining listener(s) work as before.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]