This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit 827efd023823b04306c4bdd7c6247bc58ff11715 Author: Robert Munteanu <[email protected]> AuthorDate: Wed Jun 5 14:32:29 2019 +0200 Stubbed out a wait to launch external processes --- .../java/org/apache/sling/uca/impl/IntegrationTest.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java b/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java index 9dec971..0a3af13 100644 --- a/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java +++ b/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java @@ -27,6 +27,8 @@ import java.net.MalformedURLException; import java.net.SocketTimeoutException; import java.net.URL; import java.net.URLConnection; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Test; @@ -74,7 +76,19 @@ public class IntegrationTest { } - private void runTest(String urlSpec) throws MalformedURLException, IOException { + private void runTest(String urlSpec) throws MalformedURLException, IOException, InterruptedException { + + String javaHome = System.getProperty("java.home"); + Path javaExe = Paths.get(javaHome, "bin", "java"); + ProcessBuilder pb = new ProcessBuilder(javaExe.toString(), "-version"); + pb.inheritIO(); + Process process = pb.start(); + + process.getInputStream(); + + int exitCode = process.waitFor(); + + LOG.info("Exited with code {}", exitCode); URL url = new URL(urlSpec); LOG.info("connecting to {}", url);
