Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Description
The current implementation
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> svc = context.getServiceRegistry(false).getRequiredService(Services.FRAMEWORK_ACTIVE); svc.setMode(Mode.ACTIVE); context.completeStep(); }
activates the service without waiting for it to come up. As a result you may get
org.junit.ComparisonFailure: expected:<[1]> but was:<[0]> at org.junit.Assert.assertEquals(Assert.java:125) at org.junit.Assert.assertEquals(Assert.java:147) at org.jboss.as.test.integration.osgi.management.OSGiManagementTestCase.testFrameworkActivation(OSGiManagementTestCase.java:71) [CLI-out] [standalone@10.16.95.126:9999 /] /subsystem=osgi:read-attribute(name=startlevel) [CLI-out] { [CLI-out] "outcome" => "success", [CLI-out] "result" => undefined, [CLI-out] "response-headers" => {"process-state" => "reload-required"} [CLI-out] } [CLI-inp] /subsystem=osgi:activate [CLI-out] [standalone@10.16.95.126:9999 /] /subsystem=osgi:activate 04:08:53,619 INFO [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-8) JBossOSGi Framework Core - 1.2.0.Beta2 [CLI-out] { [CLI-out] "outcome" => "success", [CLI-out] "response-headers" => {"process-state" => "reload-required"} [CLI-out] } [CLI-inp] /subsystem=osgi:read-attribute(name=startlevel) [CLI-out] [standalone@10.16.95.126:9999 /] /subsystem=osgi:read-attribute(name=startlevel) [CLI-out] { [CLI-out] "outcome" => "success", [CLI-out] "result" => 0, [CLI-out] "response-headers" => {"process-state" => "reload-required"} [CLI-out] } 04:08:55,746 INFO [org.jboss.osgi.framework.internal.StartLevelPlugin] (MSC service thread 1-4) Starting bundles for start level: 1 04:08:55,752 INFO [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: javax.servlet.api:2.5.0.Final 04:08:55,755 INFO [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: osgi.enterprise:4.2.0.201003190513 04:08:55,782 INFO [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: org.apache.felix.log:1.0.0 04:08:55,840 INFO [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: org.apache.felix.configadmin:1.2.8 04:08:55,860 INFO [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: jboss-osgi-logging:1.0.0 04:08:55,868 INFO [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: jboss-as-osgi-configadmin:7.1.2.Final-SNAPSHOT 04:08:55,873 INFO [org.jboss.osgi.framework.internal.FrameworkActive] (MSC service thread 1-4) OSGi Framework started