[
https://issues.jboss.org/browse/ARQ-1443?page=com.atlassian.jira.plugin.s...
]
Ondrej Zizka commented on ARQ-1443:
-----------------------------------
BTW I have no @Deployment if that matters. But shouldn't.
That's probably the reason.
Currently there is only a @OperatesOnDeployment mode, so Arq requires to know which
Deployment your targeting to figure out which Container scope to fetch things from.
@OperatesOnContainer is planned, but not currently implemented. I'm assuming
ManagementClient is exposed on @ContainerScope
@ArquillianResource ManagementClient doesn't work (AS 7)
--------------------------------------------------------
Key: ARQ-1443
URL:
https://issues.jboss.org/browse/ARQ-1443
Project: Arquillian
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JBoss AS Containers
Affects Versions: 1.0.4.Final
Reporter: Ondrej Zizka
{code}
@RunWith( Arquillian.class )
public class ExtActionsMigrationTest extends ExternalMigratorsTestEnv {
@ArquillianResource private ManagementClient mc;
@Test
public void testCliAction() throws Exception {
TestUtils.printTestBanner();
doTest( "CliActionTest", null, DirPreparation.NOOP );
{code}
Exception:
{code}
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@72bd402d
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)
at
org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
at
org.jboss.arquillian.container.test.impl.ClientTestInstanceEnricher.enrich(ClientTestInstanceEnricher.java:51)
...
{code}
I'm using:
{code}
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
<version>${arq.asContainer.version}</version>
<scope>test</scope>
<exclusions><exclusion>
<artifactId>jbosgi-spi</artifactId>
<groupId>org.jboss.osgi.spi</groupId></exclusion> </exclusions>
</dependency>
{code}
JBoss EAP comes from org.jboss.as:jboss-as-dist:${as.download.version}:zip
Whole container config is below.
{code}
<container qualifier="jboss" default="true">
<configuration>
<property
name="jbossHome">${basedir}/target/as-dist</property>
<!--
<property name="javaVmArguments">${arq.as.jvm.args}
-Djboss.inst=${basedir}/target/jboss-as-7.1.1.Final</property>
${arq.as.jvm.args[:]} doesn't work.
I think Arquillian splits it by spaces and then passes "" to JVM,
which then fails with "Error: Could not find or load main class ".
Lame.
-->
<property
name="javaVmArguments">-Djboss.inst=${basedir}/target/jboss-as-7.1.1.Final</property>
<property
name="serverConfig">${jboss.server.config.file.name:standalone.xml}</property>
<property
name="allowConnectingToRunningServer">true</property>
<property
name="managementAddress">${node0:127.0.0.1}</property>
<property
name="managementPort">${as.managementPort:9999}</property>
<!-- AS7-4070 -->
<property name="waitForPorts">${as.debug.port:8787}
${as.managementPort:9999}</property>
<property
name="waitForPortsTimeoutInSeconds">8</property>
</configuration>
</container>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira