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

paho: expand test coverage #3720 #3721

Closed
wants to merge 1 commit into from

Conversation

aldettinger
Copy link
Contributor

No description provided.

Comment on lines +130 to +132
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(keystore);

try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(keystore);
try {
try (InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(keystore)) {

It would be nice if we could close the InputStream

InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(keystore);

try {
Files.copy(in, Paths.get(keystore), StandardCopyOption.REPLACE_EXISTING);
Copy link
Contributor

Choose a reason for hiding this comment

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

Woudn't this copy the file to the given module's root directory, where somebody could inadvertently add it to git? Maybe under tmp or target could be better?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, I agree and prefer to create a tmp file. Thanks @ppalaga !

Copy link
Contributor

Choose a reason for hiding this comment

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

I make some similar changes to paho-mqtt5 ssl tests according to @ppalaga comments. Please review #3731

@zhfeng
Copy link
Contributor

zhfeng commented Apr 13, 2022

@aldettinger it could be useful to create a camel-quarkus-integration-tests-support-paho extension for PahoMqttResource since it is used by both paho and paho-mqtt5, WDYT ?

@ppalaga
Copy link
Contributor

ppalaga commented Apr 18, 2022

I adjusted this PR in #3733 to the style adopted in #3731

@ppalaga ppalaga closed this Apr 18, 2022
@aldettinger aldettinger deleted the CAMEL-QUARKUS-3720 branch August 30, 2022 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants