Arquillian + testng hang in deployment
huangdihu Sep 18, 2013 9:02 PMHi,
I am using Arquillian to auto-deploy my application under test, and then write TestNG test cases to test the REST API provided by the application under test.
I have 3 ears to deploy before a test case, so I use @Deployment (name="", order=x) to diff the 3 deployments.
The problem is after the first ear is deployed, it hangs there, never proceed next deployments and the following test case.
My env is:
jboss.as: 7.1.2.Final-redhat-1
jboss.as.arquillian: 7.1.3.Final
arquillian-testng-container: 1.1.1.Final
I used jconsole to check the threads, and found a clue, there is always 2 management-handler-threads WAITING, management-handler-threads - 5 is the thread who deploys the first ear.
Name: management-handler-threads - 6 (or 7)
State: WAITING on org.jboss.remoting3.remote.OutboundMessage@12cfe42
Total blocked: 16 Total waited: 3
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:503)
org.jboss.remoting3.remote.OutboundMessage$1.accept(OutboundMessage.java:91)
org.xnio.streams.BufferPipeOutputStream.send(BufferPipeOutputStream.java:125)
org.xnio.streams.BufferPipeOutputStream.send(BufferPipeOutputStream.java:113)
org.xnio.streams.BufferPipeOutputStream.getBuffer(BufferPipeOutputStream.java:77)
org.xnio.streams.BufferPipeOutputStream.write(BufferPipeOutputStream.java:95)
- locked org.xnio.streams.BufferPipeOutputStream@e0226bc
org.jboss.remoting3.remote.OutboundMessage.write(OutboundMessage.java:176)
java.io.DataOutputStream.write(DataOutputStream.java:107)
- locked java.io.DataOutputStream@4fccc5df
java.io.DataOutputStream.writeUTF(DataOutputStream.java:401)
java.io.DataOutputStream.writeUTF(DataOutputStream.java:323)
org.jboss.as.protocol.mgmt.FlushableDataOutputImpl.writeUTF(FlushableDataOutputImpl.java:109)
org.jboss.dmr.ObjectModelValue.writeExternal(ObjectModelValue.java:74)
org.jboss.dmr.ModelNode.writeExternal(ModelNode.java:1476)
org.jboss.dmr.ObjectModelValue.writeExternal(ObjectModelValue.java:75)
org.jboss.dmr.ModelNode.writeExternal(ModelNode.java:1476)
org.jboss.dmr.ObjectModelValue.writeExternal(ObjectModelValue.java:75)
org.jboss.dmr.ModelNode.writeExternal(ModelNode.java:1476)
org.jboss.dmr.ObjectModelValue.writeExternal(ObjectModelValue.java:75)
org.jboss.dmr.ModelNode.writeExternal(ModelNode.java:1476)
org.jboss.dmr.ObjectModelValue.writeExternal(ObjectModelValue.java:75)
org.jboss.dmr.ModelNode.writeExternal(ModelNode.java:1476)
org.jboss.dmr.ObjectModelValue.writeExternal(ObjectModelValue.java:75)
org.jboss.dmr.ModelNode.writeExternal(ModelNode.java:1476)
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:116)
org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287)
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:483)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:724)
org.jboss.threads.JBossThread.run(JBossThread.java:122)
And also, for the same 3 deployments, if I use junit and test EJB methods (I mean do not test REST API provided by the application under test), it does not hang.
I have been researching the hang problem for about 2 days, didn't find any solution. Is there anyone helping me out? thank you~