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

As a developer, I want to better corner sad paths for broker connections with unit tests #326

Open
james-d-brown opened this issue Oct 1, 2024 · 4 comments
Assignees
Labels
automated testing Fix or improve automated software tests
Milestone

Comments

@james-d-brown
Copy link
Collaborator

Given a broker connection factory that tests and establishes broker connections
When the factory cannot establish a connection for any reason, such as a tls failure
Then there should be adequate unit tests to corner the sad paths (as well as the happy paths)

@james-d-brown james-d-brown added the automated testing Fix or improve automated software tests label Oct 1, 2024
@james-d-brown james-d-brown added this to the v6.27 milestone Oct 1, 2024
@james-d-brown james-d-brown self-assigned this Oct 1, 2024
@james-d-brown
Copy link
Collaborator Author

Issue originally reported in Redmine ticket #133252-68 whereby the BrokerConnectionFactory reported (logged) a successful connection on which the tls handshake subsequently failed.

This ticket has two parts. First part is easy, add some unit tests for a happy path and basic sad path whereby the connection url/port is incorrect. I predict both of those tests will pass with the existing codebase.

Second part relies on tls working for broker connections. Once working, we can add a sad path with a tls failure, which will will presumably fail. Why? Based on the conversation in the above Redmine ticket, probably because the BrokerConnectionFactory is creating the connection object, which performs some subset of connection tests, such as presence/availability of the host, but does not start the connection (connection::start), which initializes the connection for messaging and presumably performs some other subset of connection checks, which includes initiating the tls handshake.

@james-d-brown
Copy link
Collaborator Author

Doing the first part and then putting this on hold, pending work on enabling tls for (events)broker connections, which is Redmine ticket #133252.

james-d-brown added a commit that referenced this issue Oct 1, 2024
Create basic happy and sad path tests for broker connections, #326.
@james-d-brown
Copy link
Collaborator Author

Second part of this is on hold until we have tls working on the eventsbroker, at which time we can hopefully create both a happy and a sad path test for it.

@epag
Copy link
Collaborator

epag commented Oct 18, 2024

TLS wasnt added this milestone, moving this ticket

@epag epag modified the milestones: v6.27, v6.28 Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated testing Fix or improve automated software tests
Projects
None yet
Development

No branches or pull requests

2 participants