zhfeng commented on code in PR #3731:
URL: https://github.com/apache/camel-quarkus/pull/3731#discussion_r850580608
##########
integration-tests/paho-mqtt5/src/main/java/org/apache/camel/quarkus/component/paho/mqtt5/it/PahoMqtt5Resource.java:
##########
@@ -68,13 +70,17 @@ public class PahoMqtt5Resource {
public String consumePahoMessage(
@PathParam("protocol") String protocol,
@PathParam("queueName") String queueName) {
+ String tmpKeystore = null;
+
if ("ssl".equals(protocol)) {
- setKeyStore(keystore, password);
+ tmpKeystore = setKeyStore(keystore, password);
}
+
String result = consumerTemplate.receiveBody("paho-mqtt5:" + queueName
+ "?brokerUrl=" + brokerUrl(protocol), 5000,
String.class);
- if ("ssl".equals(protocol)) {
- removeKeyStore(keystore);
+
+ if ("ssl".equals(protocol) && tmpKeystore != null) {
+ removeKeyStore(tmpKeystore);
Review Comment:
Well, @jamesnetherton suggest to unset the keystore properties in
https://github.com/apache/camel-quarkus/pull/3709#discussion_r845767127 and I
think it is reasonable to clean the environment properties after testing. I'm
not very sure that surefire always lauchs a new JVM for each test ? e.g. with
```reuseForks=true```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]