-
Bug
-
Resolution: Won't Do
-
Critical
-
None
ManagementClient cannot be injected by @ArquillianResource annotation if the test runs in the manual container mode, i.e. if the test itself controls start/stop actions on the container. In such case the injection fails with ' java.lang.RuntimeException: Could not lookup value for field private org.jboss.as.arquillian.container.ManagementClient'.
See the snippet of output log:
java.lang.RuntimeException: Could not lookup value for field private static org.jboss.as.arquillian.container.ManagementClient org.jboss.jbossts.txbridge.tests.inbound.junit.BasicTests.managementClient at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:61) at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52) at org.jboss.arquillian.container.test.impl.ClientTestInstanceEnricher.enrich(ClientTestInstanceEnricher.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124) . . . Caused by: java.lang.RuntimeException: Provider for type class org.jboss.as.arquillian.container.ManagementClient returned a null value: org.jboss.as.arquillian.container.ManagementClientProvider@3d47358f at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:115) at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:57) ... 71 more
I've isolated a test-case for this issue into my private branch on github, see:
https://github.com/istudens/jboss-as/compare/inject_mgmt_client
Steps to reproduce the issue:
1. git clone git@github.com:istudens/jboss-as.git
2. cd jboss-as
3. git checkout inject_mgmt_client
4. ./build.sh clean install -Dts.noSmoke -DskipTests
5. cd testsuite/integration/manual
6. mvn clean install
This issue is related to AS7-1415.
- is related to
-
WFLY-765 Allow Arquillian tests to monitor server and deployment status explicitly
- Closed