Jboss7.x Wildfly端口偏移不与Arquillain一起工作

Jboss7.x Wildfly端口偏移不与Arquillain一起工作,jboss7.x,testng,jboss-arquillian,wildfly-8,Jboss7.x,Testng,Jboss Arquillian,Wildfly 8,到目前为止,我一直在使用JBossAS7和Arquillian测试框架运行集成测试。我一直将偏移量设置为100,这很好,但现在我想将集成测试转移到Wildfly作为托管测试,但相同的测试失败,出现以下错误: arquillianBeforeSuite(com.aeroflex.teravm.selfinstall.core.ejb.SampleServiceIT)运行时间:130.749秒我解决了问题。我缺少需要设置的managementPort属性 <property name="man

到目前为止,我一直在使用JBossAS7和Arquillian测试框架运行集成测试。我一直将偏移量设置为100,这很好,但现在我想将集成测试转移到Wildfly作为托管测试,但相同的测试失败,出现以下错误:


arquillianBeforeSuite(com.aeroflex.teravm.selfinstall.core.ejb.SampleServiceIT)运行时间:130.749秒我解决了问题。我缺少需要设置的managementPort属性

<property name="managementPort">10090</property>
10090
完整的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>
            <property name="managementPort">10090</property>
        </configuration>
    </container>
</arquillian>

target/wildfly-8.0.0.Final
standalone.xml
真的
-Djboss.socket.binding.port偏移量=100
10090

如果您中的一些人通过maven运行Arquillian测试,并且您使用的是嵌入式容器,那么Arquillian.xml中的
javaVmArguments
将被忽略

您需要在pom.xml中设置JVM参数:


maven故障保护插件
-Djboss.socket.binding.port偏移量=300
org.jboss.logmanager.logmanager
假的

注意:这是maven failsafe插件的配置(即,如果您的测试是*IT.java)。如果您的Arquillian测试是*Test.java,您将需要配置maven surefireplugin。

这看起来很奇怪,您是否有可能提供完全可复制的案例?我最终解决了这个问题。。。我错过了managementPort酒店。10090
<property name="managementPort">10090</property>
<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>
<plugin>
  <artifactId>maven-failsafe-plugin</artifactId>
    <configuration>
      <argLine>-Djboss.socket.binding.port-offset=300</argLine>
         <systemPropertyVariables>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
         </systemPropertyVariables>

        <redirectTestOutputToFile>false</redirectTestOutputToFile>
  </configuration>
</plugin>