Arquillian 测试在 JBoss eap 6.1 上失败(但在 JBoss 7.1.1 上工作) [英] Arquillian tests fail on JBoss eap 6.1 (but working on JBoss 7.1.1)
问题描述
我在 JBoss eap 6.1 服务器上运行我的 arquillian 测试(由 jenkins 作业启动)时遇到问题.在 JBoss 7.1.1 服务器上运行测试没有问题,但是当我切换到 eap 6.1 时,所有测试都出现以下异常:
<前>java.lang.IllegalStateException:在 http://0.0.0.0:8080/test/ArquillianServletRunner?outputMode=serializedObject&className=testClass&methodName=testMethod&cmd=event 启动测试时出错.得到 503(服务不可用)在 org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:214)在 org.jboss.arquillian.protocol.servlet.ServletMethodExecutor$1.run(ServletMethodExecutor.java:243)在 java.util.TimerThread.mainLoop(Timer.java:555)在 java.util.TimerThread.run(Timer.java:505)如果我在本地机器上的 EAP 6.1 服务器上运行测试,一切正常(配置相同,所以不会有问题).
有人知道可能是什么问题吗?
arquillian 依赖:
<块引用> <依赖><groupId>org.jboss.spec</groupId><artifactId>jboss-javaee6-specs-bom</artifactId><version>2.0.0.Final</version><type>pom</type><范围>测试</范围></依赖><依赖><groupId>org.jboss.arquillian.junit</groupId><artifactId>arquillian-junit-container</artifactId><version>1.1.1.Final</version><范围>测试</范围></依赖><依赖><groupId>org.jboss.arquillian.protocol</groupId><artifactId>arquillian-protocol-servlet</artifactId><version>1.1.1.Final</version><范围>测试</范围></依赖><依赖><groupId>org.jboss.as</groupId><artifactId>jboss-as-arquillian-container-managed</artifactId><version>${version.org.jboss.jbossas}</version><范围>测试</范围></依赖><依赖><groupId>org.jboss.as</groupId><artifactId>jboss-as-arquillian-container-remote</artifactId><version>${version.org.jboss.jbossas}</version><范围>测试</范围></依赖><依赖><groupId>org.jboss.arquillian.extension</groupId><artifactId>arquillian-persistence-impl</artifactId><version>1.0.0.Alpha5</version><范围>测试</范围></依赖><依赖><groupId>org.jboss.shrinkwrap.resolver</groupId><artifactId>shrinkwrap-resolver-bom</artifactId><version>2.0.0</version><范围>测试</范围><type>pom</type></依赖><依赖><groupId>org.jboss.shrinkwrap</groupId><artifactId>shrinkwrap-api</artifactId><version>1.2.0</version></依赖>
我发现从 arquillian.xml 中删除<defaultProtocol type="Servlet 3.0"/>
可以解决这个问题.
I have a problem running my arquillian tests (started by a jenkins job) on a JBoss eap 6.1 server. It's no problem to run the tests on a JBoss 7.1.1 server, but when I switch to the eap 6.1 I get the following exception for all tests:
java.lang.IllegalStateException: Error launching test at http://0.0.0.0:8080/test/ArquillianServletRunner?outputMode=serializedObject&className=testClass&methodName=testMethod&cmd=event. Got 503 (Service Unavailable) at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:214) at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor$1.run(ServletMethodExecutor.java:243) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)
If I run the tests on a EAP 6.1 server on my local machine everything works fine (it's the same configuration so that can't be a problem).
Does anyone have an idea what could be the problem?
arquillian dependencies:
<dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee6-specs-bom</artifactId> <version>2.0.0.Final</version> <type>pom</type> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <version>1.1.1.Final</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <version>1.1.1.Final</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-as-arquillian-container-managed</artifactId> <version>${version.org.jboss.jbossas}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-as-arquillian-container-remote</artifactId> <version>${version.org.jboss.jbossas}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-persistence-impl</artifactId> <version>1.0.0.Alpha5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-bom</artifactId> <version>2.0.0</version> <scope>test</scope> <type>pom</type> </dependency> <dependency> <groupId>org.jboss.shrinkwrap</groupId> <artifactId>shrinkwrap-api</artifactId> <version>1.2.0</version> </dependency>
I found out that removing<defaultProtocol type="Servlet 3.0"/>
from arquillian.xml would fix this problem.
这篇关于Arquillian 测试在 JBoss eap 6.1 上失败(但在 JBoss 7.1.1 上工作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!