servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ksobkow...@apache.org
Subject servicemix git commit: SM-2867: Intermittent test failures in ActivitiExamplesTest
Date Sat, 13 Feb 2016 22:12:17 GMT
Repository: servicemix
Updated Branches:
  refs/heads/master 6c768e7f3 -> 0372131e5


SM-2867: Intermittent test failures in ActivitiExamplesTest


Project: http://git-wip-us.apache.org/repos/asf/servicemix/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix/commit/0372131e
Tree: http://git-wip-us.apache.org/repos/asf/servicemix/tree/0372131e
Diff: http://git-wip-us.apache.org/repos/asf/servicemix/diff/0372131e

Branch: refs/heads/master
Commit: 0372131e580b5dba25a3d8f89c571f854f09cc5e
Parents: 6c768e7
Author: Krzysztof Sobkowiak <krzys.sobkowiak@gmail.com>
Authored: Sat Feb 13 23:11:48 2016 +0100
Committer: Krzysztof Sobkowiak <krzys.sobkowiak@gmail.com>
Committed: Sat Feb 13 23:11:48 2016 +0100

----------------------------------------------------------------------
 .../itests/ExamplesIntegrationTests.scala         |  3 ++-
 .../itests/IntegrationTestSupport.scala           | 18 ++++++++++++++----
 2 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/servicemix/blob/0372131e/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
----------------------------------------------------------------------
diff --git a/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
b/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
index c220618..4e2c088 100644
--- a/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
+++ b/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
@@ -57,7 +57,8 @@ class ActivitiExamplesTest extends ExamplesIntegrationTests {
 
   @Test
   // running the test without uninstalling the feature afterwards, cfr. SM-2244
-  def testActivitiCamelExample = testWithFeature(false, "transaction", "examples-activiti-camel")
{
+  // installing the features separately, cfr. SM-2867
+  def testActivitiCamelExample = testWithFeature(false, true, "transaction", "activiti",
"examples-activiti-camel") {
     val orderId = "001"
 
     camelProducer.send("file:var/activiti-camel/order", new Processor() {

http://git-wip-us.apache.org/repos/asf/servicemix/blob/0372131e/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
----------------------------------------------------------------------
diff --git a/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
b/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
index e7b7ce9..fc95e26 100644
--- a/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
+++ b/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
@@ -64,13 +64,23 @@ abstract class IntegrationTestSupport extends Await with IntegrationTestConfigur
   def testWithFeature(names: String*)(block: => Unit) : Unit = testWithFeature(true, names:_*)(block)
 
   /**
-   * Install a feature and run a block of code.  Afterwards, uninstall the feature again
if indicated.
+    * Install a feature and run a block of code.  Afterwards, uninstall the feature again
if indicated.
+    */
+  def testWithFeature(uninstall: Boolean, names: String*)(block: => Unit) : Unit = testWithFeature(uninstall,
false, names:_*)(block)
+
+  /**
+   * Install a feature and run a block of code. Install features separately if indicated.
+   * Afterwards, uninstall the feature again if indicated.
    */
-  def testWithFeature(uninstall: Boolean, names: String*)(block: => Unit) =
+  def testWithFeature(uninstall: Boolean, separateInstall: Boolean,  names: String*)(block:
=> Unit) =
     try {
-      val features : Set[String] = (names toSet)
       //TODO: Get this working without the extra options - enabling bundle refresh here will
mess up the test container
-      featuresService.installFeatures(features, util.EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles))
+      if (separateInstall) {
+        names foreach {featuresService.installFeature(_, util.EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles))}
+      } else {
+        val features : Set[String] = (names toSet)
+        featuresService.installFeatures(features, util.EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles))
+      }
       block
     } finally {
        if(uninstall) names foreach { featuresService.uninstallFeature }


Mime
View raw message