You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2014/02/20 14:55:14 UTC
svn commit: r1570189 - in
/servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests:
ExamplesIntegrationTests.scala IntegrationTestSupport.scala
Author: gertv
Date: Thu Feb 20 13:55:13 2014
New Revision: 1570189
URL: http://svn.apache.org/r1570189
Log:
SM-2234: Workaround for Activiti itest failure
Thanks to Bart for providing the patch!
Modified:
servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
Modified: servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala?rev=1570189&r1=1570188&r2=1570189&view=diff
==============================================================================
--- servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala (original)
+++ servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala Thu Feb 20 13:55:13 2014
@@ -52,11 +52,11 @@ class ActiveMQExamplesTest extends Examp
/**
* Tests for the Activiti examples
*/
-@Ignore("SM-2234: Activiti itest fails - runs same test twice?")
class ActivitiExamplesTest extends ExamplesIntegrationTests {
@Test
- def testActivitiCamelExample = testWithFeature("examples-activiti-camel") {
+ // running the test without uninstalling the feature afterwards, cfr. SM-2244
+ def testActivitiCamelExample = testWithFeature(false, "examples-activiti-camel") {
val orderId = "001"
camelProducer.send("file:var/activiti-camel/order", new Processor() {
Modified: servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala?rev=1570189&r1=1570188&r2=1570189&view=diff
==============================================================================
--- servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala (original)
+++ servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestSupport.scala Thu Feb 20 13:55:13 2014
@@ -59,19 +59,23 @@ abstract class IntegrationTestSupport ex
lazy val logFile : File = new File(logFolder, "servicemix.log")
/**
- * Install a feature and run a block of code. Afterwards, uninstall the feature again.
+ * Install a feature and run a block of code. Afterwards, uninstall the feature again
*/
- def testWithFeature(names: String*)(block: => Unit) =
+ 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.
+ */
+ def testWithFeature(uninstall: Boolean, names: String*)(block: => Unit) =
try {
val features : Set[Feature] = ( names map { name => featuresService.getFeature(name) } 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))
block
} finally {
- names foreach { featuresService.uninstallFeature }
+ if(uninstall) names foreach { featuresService.uninstallFeature }
}
-
/**
* Expect a certain condition to occur within the allotted waiting time.
*/