[
https://issues.apache.org/jira/browse/SM-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13986010#comment-13986010
]
Krzysztof Sobkowiak commented on SM-2284:
-----------------------------------------
If you look into the failed log file you can see the Camel Drools example
bundle is started (at 23:09:01,616), the OSGi extender start creating the
Spring context and next the bundle starts stopping (at 23:09:17,553)
{code}
| 168 - org.apache.servicemix.examples.camel-drools - 5.1.0.SNAPSHOT |
BundleEvent STARTED - org.apache.servicemix.examples.camel-drools
| 109 - org.apache.geronimo.specs.geronimo-osgi-registry - 1.1.0 | Bundle
Considered for class providers: org.apache.servicemix.examples.camel-drools
| 109 - org.apache.geronimo.specs.geronimo-osgi-registry - 1.1.0 | adding
bundle org.apache.servicemix.examples.camel-drools [168]
| 101 - org.springframework.osgi.extender - 1.2.1 | Scanning bundle [Apache
ServiceMix :: Examples :: Camel Drools
(org.apache.servicemix.examples.camel-drools)] for configurations...
| 101 - org.springframework.osgi.extender - 1.2.1 | Creating an application
context for bundle [Apache ServiceMix :: Examples :: Camel Drools
(org.apache.servicemix.examples.camel-drools)]
| 101 - org.springframework.osgi.extender - 1.2.1 | Discovered configurations
{osgibundle:/META-INF/spring/*.xml} in bundle [Apache ServiceMix :: Examples ::
Camel Drools (org.apache.servicemix.examples.camel-drools)]
| 101 - org.springframework.osgi.extender - 1.2.1 | Asynchronous context
creation for bundle [Apache ServiceMix :: Examples :: Camel Drools
(org.apache.servicemix.examples.camel-drools)]
| 101 - org.springframework.osgi.extender - 1.2.1 | Setting globally defined
wait-for-dependencies timeout value=300000 ms, for bundle [Apache ServiceMix ::
Examples :: Camel Drools (org.apache.servicemix.examples.camel-drools)]
| 154 - org.ops4j.pax.swissbox.extender - 1.7.0 | Scanning bundle
[org.apache.servicemix.examples.camel-drools]
| 101 - org.springframework.osgi.extender - 1.2.1 | Starting first stage of
refresh for
OsgiBundleXmlApplicationContext(bundle=org.apache.servicemix.examples.camel-drools,
config=osgibundle:/META-INF/spring/*.xml)
| 101 - org.springframework.osgi.extender - 1.2.1 | Calling preRefresh on
OsgiBundleXmlApplicationContext(bundle=org.apache.servicemix.examples.camel-drools,
config=osgibundle:/META-INF/spring/*.xml)
| 72 - org.springframework.context - 3.2.4.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=org.apache.servicemix.examples.camel-drools,
config=osgibundle:/META-INF/spring/*.xml): startup date [Sun Apr 20 23:09:01
CEST 2014]; root of context hierarchy
| 8 - org.apache.aries.blueprint.core - 1.4.0 | Starting BlueprintContainer
destruction process for bundle org.apache.servicemix.examples.camel-drools
| 8 - org.apache.aries.blueprint.core - 1.4.0 | Not a blueprint bundle or
destruction of BlueprintContainer already finished for
org.apache.servicemix.examples.camel-drools.
| 98 - org.apache.camel.camel-core - 2.13.0 | Bundle stopped:
org.apache.servicemix.examples.camel-drools
| 168 - org.apache.servicemix.examples.camel-drools - 5.1.0.SNAPSHOT |
BundleEvent STOPPING - org.apache.servicemix.examples.camel-drools
{code}
In the correct testcase run the OSGi extender creates the context, the defined
beans are initialized and the Camel context is started.
{code}
| 72 - org.springframework.context - 3.2.4.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=org.apache.servicemix.examples.camel-drools,
config=osgibundle:/META-INF/spring/*.xml): startup date [Sun Apr 20 23:54:22
CEST 2014]; root of context hierarchy
| 72 - org.springframework.context - 3.2.4.RELEASE | Bean factory for
OsgiBundleXmlApplicationContext(bundle=org.apache.servicemix.examples.camel-drools,
config=osgibundle:/META-INF/spring/*.xml):
org.springframework.beans.factory.support.DefaultListableBeanFactory@679217b7:
defining beans
[node1,kbase1,ksession1,droolsHelper,personHelper,drools,DrinkChooser,template,consumerTemplate,camel-2:beanPostProcessor,camel-2];
root of factory hierarchy
....
{code}
The bundle started at 23:54:22,52 and was transitted into {{STOPPING}} state at
23:54:30,803
>From any reason the bundle starts stopping before the Spring context is
>completely created.
> Intermittent test failure in CamelExamplesTest.testCamelDroolsExample
> ---------------------------------------------------------------------
>
> Key: SM-2284
> URL: https://issues.apache.org/jira/browse/SM-2284
> Project: ServiceMix
> Issue Type: Bug
> Components: itests
> Affects Versions: 5.1.0, 6.0.0
> Reporter: Krzysztof Sobkowiak
> Fix For: 5.1.0, 6.0.0
>
> Attachments:
> org.apache.servicemix.itests.CamelExamplesTest-failed.txt,
> org.apache.servicemix.itests.CamelExamplesTest-ok.txt
>
>
> There is an intermittent test failure in
> {{org.apache.servicemix.itests.CamelExamplesTest.testCamelDroolsExample}}
> {code}
> Caused by: java.lang.AssertionError: Gave up waiting for test condition
> at org.junit.Assert.fail(Assert.java:88)
> at
> org.apache.servicemix.itests.IntegrationTestSupport.expect(IntegrationTestSupport.scala:83)
> at
> org.apache.servicemix.itests.CamelExamplesTest$$anonfun$testCamelDroolsExample$1.apply$mcV$sp(ExamplesIntegrationTests.scala:86)
> at
> org.apache.servicemix.itests.IntegrationTestSupport.testWithFeature(IntegrationTestSupport.scala:74)
> at
> org.apache.servicemix.itests.IntegrationTestSupport.testWithFeature(IntegrationTestSupport.scala:64)
> at
> org.apache.servicemix.itests.CamelExamplesTest.testCamelDroolsExample(ExamplesIntegrationTests.scala:85)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)