You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2019/10/21 15:57:20 UTC

[karaf] branch master updated: Increase itest default timeout for command, service, and bundle

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new c849611  Increase itest default timeout for command, service, and bundle
     new 203ffc5  Merge pull request #970 from jbonofre/ITEST_TIMEOUT
c849611 is described below

commit c8496118208283229446fe6e52a299ef8d24f24f
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Sun Oct 20 21:03:24 2019 +0200

    Increase itest default timeout for command, service, and bundle
---
 .../org/apache/karaf/itests/KarafTestSupport.java   | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
index c31a5a5..38094b3 100644
--- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
+++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
@@ -59,7 +59,6 @@ import org.junit.runners.model.Statement;
 
 import org.ops4j.pax.exam.*;
 import org.ops4j.pax.exam.container.remote.RBCRemoteTargetOptions;
-import org.ops4j.pax.exam.container.remote.options.RBCLookupTimeoutOption;
 import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
 import org.ops4j.pax.exam.karaf.options.KarafDistributionOption;
 import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
@@ -89,9 +88,9 @@ public class KarafTestSupport {
     public static final String MIN_SSH_PORT = "8101";
     public static final String MAX_SSH_PORT = "8888";
 
-    static final Long COMMAND_TIMEOUT = 30000L;
-    static final Long SERVICE_TIMEOUT = 30000L;
-    static final long BUNDLE_TIMEOUT = 30000L;
+    static final Long COMMAND_TIMEOUT = 3600000L;
+    static final Long SERVICE_TIMEOUT = 3600000L;
+    static final long BUNDLE_TIMEOUT = 3600000L;
 
     private static Logger LOG = LoggerFactory.getLogger(KarafTestSupport.class);
 
@@ -182,9 +181,7 @@ public class KarafTestSupport {
         if (localRepository == null) {
             localRepository = "";
         }
-
         if (JavaVersionUtil.getMajorVersion() >= 9) {
-            
             return new Option[]{
                 //debugConfiguration("8889", true),
                 KarafDistributionOption.karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
@@ -193,6 +190,8 @@ public class KarafTestSupport {
                 KarafDistributionOption.configureConsole().ignoreLocalConsole(),
                 KarafDistributionOption.keepRuntimeFolder(),
                 KarafDistributionOption.logLevel(LogLevel.INFO),
+                CoreOptions.systemTimeout(3600000),
+                RBCRemoteTargetOptions.waitForRBCFor(3600000),
                 CoreOptions.mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject(),
                 CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
                 CoreOptions.mavenBundle().groupId("org.apache.karaf.itests").artifactId("common").versionAsInProject(),
@@ -234,7 +233,6 @@ public class KarafTestSupport {
                 
             };
         } else {
-                
             return new Option[]{
                 //debugConfiguration("8889", true),
                 KarafDistributionOption.karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
@@ -243,8 +241,8 @@ public class KarafTestSupport {
                 KarafDistributionOption.configureConsole().ignoreLocalConsole(),
                 KarafDistributionOption.keepRuntimeFolder(),
                 KarafDistributionOption.logLevel(LogLevel.INFO),
-                CoreOptions.systemTimeout(360000),
-                RBCRemoteTargetOptions.waitForRBCFor(360000),
+                CoreOptions.systemTimeout(3600000),
+                RBCRemoteTargetOptions.waitForRBCFor(3600000),
                 CoreOptions.mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject(),
                 CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
                 CoreOptions.mavenBundle().groupId("org.apache.karaf.itests").artifactId("common").versionAsInProject(),
@@ -257,8 +255,7 @@ public class KarafTestSupport {
                 KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.localRepository", localRepository),
                 KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner
                 KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", "")
-            };  
-                                
+            };
         }
     }
 
@@ -276,7 +273,6 @@ public class KarafTestSupport {
 
     /**
      * Executes a shell command and returns output as a String.
-     * Commands have a default timeout of 10 seconds.
      *
      * @param command The command to execute
      * @param principals The principals (e.g. RolePrincipal objects) to run the command under
@@ -288,7 +284,6 @@ public class KarafTestSupport {
 
     /**
      * Executes a shell command and returns output as a String.
-     * Commands have a default timeout of 10 seconds.
      *
      * @param command    The command to execute.
      * @param timeout    The amount of time in millis to wait for the command to execute.