Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Enhancement: All routers under test should have a consistent API for accessing the management interface #753

Open
kgiusti opened this issue Sep 30, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@kgiusti
Copy link
Contributor

kgiusti commented Sep 30, 2022

#743 (comment)

There is a hardcoded "convention" where the CI router class uses 'router.addresses[0]' as the network address for the AMQP listener used for management requests. This convention is not enforced, and where it is used the tests hardcode router.addresses[0] in line.

This makes it difficult to implement generic management operations in the router class, with the above link as an example.

Proposal:

  • remove hardcoded use of router.addresses[0] in tests by converting these to using the router.management property.
  • Update all test router configurations to ensure the first listener is a "normal" AMQP listener, or force this behavior by default in the Qdrouterd constructor (better).
  • If there are tests that MUST instantiate some other listener for management provide an optional "management address override index" to allow tests to specify which listener should be used for the router.management property
  • For any test that MUST not instantiate an AMQP listener due to test constraints then router.management should return None and the test is responsible for dealing with router cleanup, etc.
@kgiusti kgiusti added the enhancement New feature or request label Sep 30, 2022
@kgiusti
Copy link
Contributor Author

kgiusti commented Sep 30, 2022

@ganeshmurthy Just FYI

@ganeshmurthy
Copy link
Contributor

@kgiusti router.addresses[0] returns a string while the router.management property seems to be an instance of the Node object. So, all uses of router.addresses[0] cannot be immediately converted to use router.management property. Most of the tests that use router.addresses[0] make a connection on that address, that connection object could be replaced with router.management.connection

@ganeshmurthy ganeshmurthy added this to the 2.4.0 milestone Feb 6, 2023
@ganeshmurthy ganeshmurthy modified the milestones: 2.4.0, 2.5.0 Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants