间歇性失败 运行 arquillian 测试

Intermittent failure running arquillian tests

我在 Red Hat EAP 6.4 (JBoss AS 7) 上进行 运行 arquillian 测试,但出现间歇性故障。大约一半的时间,一切都按预期运行到最后。另一半时间我注意到 "arquillian-service" 没有部署到应用程序服务器,这导致在部署 war 时出现以下错误:

{"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.module.service.\"deployment.myapp.war\".main is missing [jboss.module.spec.service.\"deployment.arquillian-service\".main, module.resolved.service.\"deployment.myapp.war\".main]",
"jboss.module.resolve.phase.\"deployment.myapp.war\".main.1 is missing [jboss.module.spec.service.\"deployment.arquillian-service\".main]"]}

环境

相关依赖项(Arquillian 容器版本 7.2.0.Final)

    <dependency>
      <groupId>org.jboss.as</groupId>
      <artifactId>jboss-as-arquillian-container-remote</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.protocol</groupId>
      <artifactId>arquillian-protocol-servlet</artifactId>
      <scope>test</scope>
    </dependency>

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">

  <container qualifier="jboss-remote" default="true">
    <configuration>
      <property name="managementAddress">${jboss.host}</property>
      <property name="username">${jboss.admin.user}</property>
      <property name="password">${jboss.admin.password}</property>

      <!-- Management port must be 9999 -->
      <property name="managementPort">9999</property>
    </configuration>
    <protocol type="Servlet 3.0">
      <property name="host">${jboss.host}</property>
      <property name="port">${jboss.host.port}</property>
    </protocol>

  </container>

</arquillian>

在您的相关依赖项列表中,没有最重要的依赖项:

<dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> </dependency>

你是不是忘了把它添加到那里?

这似乎是 Windows 上的一个问题,我无法在 Linux 上重现它。