From 0eb9f57f198fe194c070295c261e8bafeaed08aa Mon Sep 17 00:00:00 2001 From: Mesbah Alam Date: Wed, 31 Mar 2021 16:27:02 -0400 Subject: [PATCH] Launch RMI and RMID for api/java_rmi tests only + increase timeout (#422) Signed-off-by: Mesbah_Alam@ca.ibm.com --- .../test.jck/net/adoptopenjdk/stf/Jck.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/openjdk.test.jck/src/test.jck/net/adoptopenjdk/stf/Jck.java b/openjdk.test.jck/src/test.jck/net/adoptopenjdk/stf/Jck.java index d6eae058..a86945ef 100644 --- a/openjdk.test.jck/src/test.jck/net/adoptopenjdk/stf/Jck.java +++ b/openjdk.test.jck/src/test.jck/net/adoptopenjdk/stf/Jck.java @@ -357,13 +357,16 @@ public void execute(StfCoreExtension test) throws Exception { .addArg(" -passive") ); - rmiRegistry = test.doRunBackgroundProcess("Starting rmiregistry", "RMI", ECHO_ON, ExpectedOutcome.neverCompletes(), test.createJDKToolProcessDefinition() - .setJDKToolOrUtility("rmiregistry") ); - - rmid = test.doRunBackgroundProcess("Starting rmid", "RMID", ECHO_ON, ExpectedOutcome.neverCompletes(), test.createJDKToolProcessDefinition() - .setJDKToolOrUtility("rmid") - .addArg("-J-Dsun.rmi.activation.execPolicy=none " + "-J-Djava.security.policy=" + test.env().findPrereqFile(testSuiteFolder + "/lib/jck.policy").toString()) - ); + // We only need RMI registry and RMI activation daemon processes for tests under api/java_rmi + if (tests.contains("api/java_rmi")) { + rmiRegistry = test.doRunBackgroundProcess("Starting RMI registry", "RMI", ECHO_ON, ExpectedOutcome.neverCompletes(), test.createJDKToolProcessDefinition() + .setJDKToolOrUtility("rmiregistry") ); + + rmid = test.doRunBackgroundProcess("Starting RMI activation system daemon", "RMID", ECHO_ON, ExpectedOutcome.neverCompletes(), test.createJDKToolProcessDefinition() + .setJDKToolOrUtility("rmid") + .addArg("-J-Dsun.rmi.activation.execPolicy=none " + "-J-Djava.security.policy=" + test.env().findPrereqFile(testSuiteFolder + "/lib/jck.policy").toString()) + ); + } // tnameserv has been removed from jdk11. We only should need it for jck8 if (jckVersion.contains("jck8")) { @@ -381,7 +384,7 @@ public void execute(StfCoreExtension test) throws Exception { // Use the presence of a '/' to signify that we are running a subset of tests. // If one of the highest level test nodes is being run it is likely to take a long time. if ( tests.contains("/") && !isRiscv ) { - timeout = "6h"; + timeout = "8h"; } outcome = ExpectedOutcome.cleanRun().within(timeout);