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

Fix tests to support ProxyConnectionFactory #881

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bob-barrett
Copy link
Member

No description provided.

@ghost
Copy link

ghost commented Aug 18, 2021

Hey @bob-barrett,
thank you for your Pull Request.

@confluentinc It looks like this brave person signed our Contributor License Agreement. 👍

Always at your service,

clabot

Copy link
Member

@dimitarndimitrov dimitarndimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bob-barrett, is it that because of some specificity only these tests will be affected by adding a ProxyConnectionFactory to our connection factory pipeline? I.e. I'm not sure I understand why is this a problem just for some tests.

Comment on lines +10 to +11
<version>7.1.0-0</version>
<!-- <version>[7.1.0-0, 7.1.1-0)</version> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to submit that temporarily? If yes, can you please add a comment explaining why? If not, is that a leftover from some testing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is just so that it will consume the rest-utils local changes when running tests, I'll get rid of it before I convert this to a real PR.

if (certificates != null && baseUri.getScheme().equals("http")) {
// If PROXY protocol is enabled, the base URI will come back as http because the first connection
// factory is not the SSL factory. If we want SSL, explicitly set the scheme here
baseUri = new URI(baseUri.toString().replace("http", "https"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We have loaded the JAX-RS classes for Kafka REST, so it might be a tad nicer to use javax.ws.rs.core.UriBuilder here:

baseUri = UriBuilder.fromUri(baseUri).scheme("https").build();

Copy link

cla-assistant bot commented Sep 12, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@dimitarndimitrov dimitarndimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bob-barrett Is this still relevant? I assume it's not and we can close it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants