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/22 05:20:19 UTC

[karaf] branch karaf-4.2.x updated (88d3f64 -> 4e060da)

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

jbonofre pushed a change to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git.


    from 88d3f64  [KARAF-6472] Properly handle choice of non-blacklisted features where there are many of them
     new 7651a2d  Increase itest default timeout for command, service, and bundle
     new 4e060da  Increase timeout in XATest as it can fail on slow machines

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/karaf/itests/KarafTestSupport.java     | 19 +++++++++----------
 .../src/test/java/org/apache/karaf/itests/XATest.java |  4 ++--
 2 files changed, 11 insertions(+), 12 deletions(-)


[karaf] 01/02: Increase itest default timeout for command, service, and bundle

Posted by jb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7651a2d4852559f39a930f2c4df609fc9b30be55
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     | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 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 e126142..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
@@ -58,6 +58,7 @@ import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
 import org.ops4j.pax.exam.*;
+import org.ops4j.pax.exam.container.remote.RBCRemoteTargetOptions;
 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;
@@ -87,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);
 
@@ -180,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")),
@@ -191,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(),
@@ -232,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")),
@@ -241,6 +241,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(),
@@ -253,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", "")
-            };  
-                                
+            };
         }
     }
 
@@ -272,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
@@ -284,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.


[karaf] 02/02: Increase timeout in XATest as it can fail on slow machines

Posted by jb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4e060dab51777160221500a8509cb53b47508f96
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Tue Oct 22 07:19:50 2019 +0200

    Increase timeout in XATest as it can fail on slow machines
---
 itests/test/src/test/java/org/apache/karaf/itests/XATest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
index 4f337a9..8c2ec99 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
@@ -89,7 +89,7 @@ public class XATest extends BaseTest {
         Bundle bundle = bundleContext.installBundle("blueprint:file:etc/xa-test-camel.xml");
         bundle.start();
 
-        Thread.sleep(5000);
+        Thread.sleep(20000);
 
         System.out.println(executeCommand("camel:route-list"));
 
@@ -99,7 +99,7 @@ public class XATest extends BaseTest {
         System.out.println("== Sending a message in Artemis broker that should be consumed by Camel route and inserted into the Derby database");
         System.out.println(executeCommand("jms:send artemis MyQueue 'the-message'"));
 
-        Thread.sleep(5000);
+        Thread.sleep(15000);
 
         String output = executeCommand("jdbc:query derby select * from messages");
         System.err.println(output);