You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2022/02/10 15:44:02 UTC
[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1512: DISPATCH-2327: clean up link routes at end of tests
jiridanek commented on a change in pull request #1512:
URL: https://github.com/apache/qpid-dispatch/pull/1512#discussion_r803813675
##########
File path: tests/system_tests_multi_tenancy.py
##########
@@ -229,6 +231,17 @@ def test_16_two_router_anonymous_sender_tenant_on_both(self):
test.run()
self.assertIsNone(test.error)
+ def _cleanup_link_routes(func):
+ """Wait for all link routes to clean up before exiting the test
+ """
+ @wraps(func)
+ def wrapper(self, *args, **kwargs):
+ func(self, *args, **kwargs)
+ self.routers[0].wait_address_unsubscribed("D0.0.0.0/link")
+ self.routers[1].wait_address_unsubscribed("D0.0.0.0/link")
+ return wrapper
+
+ @_cleanup_link_routes # type: ignore
Review comment:
```
77: /home/jdanek/repos/qpid/qpid-dispatch/tests/system_tests_multi_tenancy.py:255: error: Argument 1 to "_cleanup_link_routes" has incompatible type "Callable[[RouterTest], Any]"; expected "RouterTest" [arg-type]
```
That is actually legit. Your `def _cleanup_link_routes(func):` is an instance method in a class, so the first argument should be `self`. So the types should be fixed.
--
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.
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org