llowinge commented on code in PR #8877:
URL: https://github.com/apache/camel-quarkus/pull/8877#discussion_r3595343055


##########
integration-tests-support/splunk/src/test/java/org/apache/camel/quarkus/test/support/splunk/SplunkTestResource.java:
##########
@@ -125,6 +129,20 @@ public Map<String, String> start() {
                     .collect(Collectors.joining("\n")));
             LOG.debug(banner);
 
+            // In Quarkus native, test can fail with 
`java.net.SocketException: Network is unreachable` if underlying network isn't 
ready yet
+            LOG.info("Waiting for Splunk network bridge ({}:{}) to be fully 
ready...", splunkHost, hecPort);
+
+            Awaitility.await()
+                    .atMost(Duration.ofSeconds(60))
+                    .pollInterval(Duration.ofMillis(500))
+                    .ignoreExceptions()
+                    .until(() -> {
+                        LOG.info("Trying to connect to Splunk HEC via 
socket.");
+                        try (Socket socket = new Socket(splunkHost, hecPort)) {

Review Comment:
   good idea, but i will have to move the wait into the test class, because 
this solution is not sufficient for some reason



-- 
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]

Reply via email to