Uploaded image for project: 'Brooklyn'
  1. Brooklyn
  2. BROOKLYN-377

Test DSL breaks with multiple applications

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • None

    Description

      When multiple different test applications are started, these appear to interact causing one to fail with the error

      AssertionError: service.isUp expected equals true but found false

      An example blueprint:

      brooklyn.catalog:
        version: "4.1.0-SNAPSHOT" # AMP_VERSION
        items:
        - "https://raw.githubusercontent.com/brooklyncentral/common-catalog-utils/master/common-tests/src/main/resources/commontests/common.tests.bom"
        - "https://raw.githubusercontent.com/brooklyncentral/brooklyn-tomcat-7-server/master/catalog.bom"
        - "https://raw.githubusercontent.com/brooklyncentral/brooklyn-jboss-application-server-6/master/catalog.bom"
        - id: TomcatTest
          itemType: template
          name: Tomcat Test
          item:
            services:
            - type: brooklyn-tomcat-7-server
              id: target-app1
            - type: test-case
              brooklyn.config:
                targetId: target-app1
              brooklyn.children:
                - type: assert-up-and-running-initial
                  name: "1. Target app up and running"
        - id: Jboss6ASTest
          itemType: template
          name: JBoss 6 AS Test
          item:
            services:
            - type: brooklyn-jboss-application-server-6
              id: target-app2
            - type: test-case
              brooklyn.config:
                targetId: target-app2
              brooklyn.children:
                - type: assert-up-and-running-initial
                  name: "1. Target app up and running"
      

      Then start both TomcatTest and Jboss6ASTest at the same time. The log contains:

      2016-11-01 17:37:11,140 DEBUG 115 o.a.b.c.b.s.d.BrooklynDslDeferredSupplier [ager-gr9jaMDG-15] Queuing task to resolve $brooklyn:scopeRoot().config("timeout.initialStartup"), called by Task[retrieving config for timeout.initialStartup]@fRU8hX4P
      2016-11-01 17:37:11,141 DEBUG 115 o.a.b.c.b.s.d.BrooklynDslDeferredSupplier [ager-gr9jaMDG-15] Resolved TestSensorImpl{id=tyw62yh1qe} from $brooklyn:scopeRoot().config("timeout.initialStartup")
      2016-11-01 17:37:11,142 DEBUG 115 o.a.b.c.b.s.d.BrooklynDslDeferredSupplier [ager-gr9jaMDG-16] Resolved null from $brooklyn:scopeRoot().config("timeout.initialStartup")
      2016-11-01 17:37:11,150 DEBUG 140 o.a.b.u.r.Repeater [nager-gr9jaMDG-0] Repeater
      java.lang.AssertionError: service.isUp expected equals true but found false
              at org.apache.brooklyn.test.framework.TestFrameworkAssertions.failAssertion(TestFrameworkAssertions.java:423)
              at org.apache.brooklyn.test.framework.TestFrameworkAssertions.checkActualAgainstAssertions(TestFrameworkAssertions.java:296)
              at org.apache.brooklyn.test.framework.TestFrameworkAssertions$3.call(TestFrameworkAssertions.java:253)
              at org.apache.brooklyn.test.framework.TestFrameworkAssertions$3.call(TestFrameworkAssertions.java:244)
              at org.apache.brooklyn.util.repeat.Repeater.runKeepingError(Repeater.java:336)
              at org.apache.brooklyn.util.repeat.Repeater.runRequiringTrue(Repeater.java:307)
              at org.apache.brooklyn.test.framework.TestFrameworkAssertions.checkAssertionsEventually(TestFrameworkAssertions.java:243)
              at org.apache.brooklyn.test.framework.TestFrameworkAssertions.checkAssertionsEventually(TestFrameworkAssertions.java:212)
              at org.apache.brooklyn.test.framework.TestSensorImpl.start(TestSensorImpl.java:77)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_80]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_80]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80]
              at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_80]
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)[85:groovy-all:2.3.7]
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)[85:groovy-all:2.3.7]
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)[85:groovy-all:2.3.7]
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)[85:groovy-all:2.3.7]
              at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)[85:groovy-all:2.3.7]
              at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)[jar:bundle://85.0:0/!/:2.3.7]
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)[85:groovy-all:2.3.7]
              at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)[jar:bundle://85.0:0/!/:2.3.7]
              at org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)[141:org.apache.brooklyn.utils-groovy:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:315)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:339)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:276)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:148)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:56)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:50)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:522)[117:org.apache.brooklyn.core:0.10.0.20161013_2025]
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_80]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_80]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_80]
              at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]
      2016-11-01 17:37:11,152 DEBUG 140 o.a.b.u.r.Repeater [nager-gr9jaMDG-0] Repeater: unsatisfied during iteration 1 (max 2147483647 attempts)(30.0s remaining)
      2016-11-01 17:37:11,154 DEBUG 140 o.a.b.u.r.Repeater [nager-gr9jaMDG-0] Repeater
      java.lang.AssertionError: service.isUp expected equals true but found false
      

      Attachments

        Issue Links

          Activity

            People

              aled.sage Aled Sage
              drigodwin Duncan Godwin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: