Wildfly端口偏移不适用于Arquillain [英] Wildfly port offset not working with Arquillain
问题描述
到目前为止,我一直在使用通过Arquillian Testing框架管理的JBOSS AS 7运行集成测试.我一直将偏移量设置为100.这一直很好,但是现在我想将集成测试转移到Wildfly AS托管,但是相同的测试失败,并出现以下错误:
Up until now I've been running my intergration tests using JBOSS AS 7 managed with Arquillian Testing framework. I have been setting the offset by 100 This has been working fine but now I want to transfer my integration tests to Wildfly AS managed but the same tests fail with the following error:
arquillianBeforeSuite(com.aeroflex.teravm.selfinstall.core.ejb.SampleServiceIT)经过的时间:130.749秒<<失败! org.jboss.arquillian.container.spi.client.container.LifecycleException:无法启动容器
arquillianBeforeSuite(com.aeroflex.teravm.selfinstall.core.ejb.SampleServiceIT) Time elapsed: 130.749 sec <<< FAILURE! org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
这是我的Arquillian.xml
Here is my Arquillian.xml
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!-- <defaultProtocol type="Servlet 3.1"/> -->
<container qualifier="wildfly-managed" default="true">
<configuration>
<property name="jbossHome">target/wildfly-8.0.0.Final</property>
<property name="serverConfig">standalone.xml</property>
<property name="outputToConsole">true</property>
<property name="javaVmArguments">-Djboss.socket.binding.port-offset=100</property>
</configuration>
</container>
</arquillian>
以及其中一项集成测试的示例:
and a sample of one of the integration tests:
public class SampleServiceIT extends BaseServiceIT
{
@Inject
private SampleService sampleService;
@Parameters(ARQUILLIAN_DATA_PROVIDER)
@Test(groups = {"integration"})
public void testGetNotExisting() throws ServiceException
{
Long id = new Long(5);
SampleBean result = sampleService.getSampleObjectById(id);
Assert.assertNull(result);
}
}
如果我不更改端口偏移量,而保留默认值,则可以正常工作.
If I don't change the port offset and just leave the defaults it works fine.
非常感谢您提前提供帮助.
Thanks for any help in advance.
推荐答案
我发现了问题所在.我缺少需要设置的managementPort属性.
I figured out the problem. I was missing the managementPort property which needs to be set.
<property name="managementPort">10090</property>
完整的arquillian.xml文件:
Full arquillian.xml file:
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!-- <defaultProtocol type="Servlet 3.1"/> -->
<container qualifier="wildfly-managed" default="true">
<configuration>
<property name="jbossHome">target/wildfly-8.0.0.Final</property>
<property name="serverConfig">standalone.xml</property>
<property name="outputToConsole">true</property>
<property name="javaVmArguments">-Djboss.socket.binding.port-offset=100</property>
<property name="managementPort">10090</property>
</configuration>
</container>
</arquillian>
这篇关于Wildfly端口偏移不适用于Arquillain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!