zhfeng commented on code in PR #3721:
URL: https://github.com/apache/camel-quarkus/pull/3721#discussion_r849009050
##########
integration-tests/paho/src/main/java/org/apache/camel/quarkus/component/paho/PahoResource.java:
##########
@@ -92,7 +116,41 @@ public String mqttExceptionDuringReconnectShouldSucceed() {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String
readThenWriteWithFilePersistenceShouldSucceed(@QueryParam("message") String
message) throws Exception {
-
producerTemplate.requestBody("paho:withFilePersistence?retained=true&persistence=FILE",
message);
- return
consumerTemplate.receiveBody("paho:withFilePersistence?persistence=FILE", 5000,
String.class);
+
producerTemplate.requestBody("paho:withFilePersistence?retained=true&persistence=FILE&brokerUrl="
+ brokerUrl("tcp"),
+ message);
+ return
consumerTemplate.receiveBody("paho:withFilePersistence?persistence=FILE&brokerUrl="
+ brokerUrl("tcp"), 5000,
+ String.class);
+ }
+
+ private String brokerUrl(String protocol) {
+ return ConfigProvider.getConfig().getValue("paho.broker." + protocol +
".url", String.class);
+ }
+
+ private void setKeyStore(String keystore, String password) {
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResourceAsStream(keystore);
+
+ try {
+ Files.copy(in, Paths.get(keystore),
StandardCopyOption.REPLACE_EXISTING);
Review Comment:
yeah, I agree and prefer to create a tmp file. Thanks @ppalaga !
--
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]