-
1. Re: Arquillian-extension-Moco
asotobu Apr 7, 2014 3:48 AM (in response to asotobu)I have tried with Wildfly embedded and it works so could it be a problem with TomEE embed container? Any idea?
-
2. Re: Arquillian-extension-Moco
asotobu Apr 7, 2014 6:10 AM (in response to asotobu)Romain Mani-Bucau has noted me that I will need to add <defaultProtocol type="Servlet 3.0" /> to make the embed mode working in arquillian.xml. Thank you so much
Anyway is there any way to automatically add it and don't force users to add it manually?
-
3. Re: Arquillian-extension-Moco
kpiwko Apr 7, 2014 7:11 AM (in response to asotobu)1 of 1 people found this helpfulGlad that you finally resolved that! I've tried to view events via -Darquillian.debug, but I wasn't able to figure out something significant.
Every container has a default protocol. WildFly was recently switched to have Servlet 3.0 as default. Embedded TomEE has Local as default:
Maybe that's something what could be changed, if you file a JIRA for TomEE ;-)
Karel
-
4. Re: Arquillian-extension-Moco
asotobu Apr 7, 2014 7:20 AM (in response to kpiwko)Cool!! only one question that maybe you have found developing arquillian-spacelift. Moco under the covers it uses a Netty server which opens threads and socket connections. The problem is that it opens correctly, but when I stopped, next trace error is thrown: The web application [/a0831135-4abd-4cb7-87b5-32d087d03f0f] appears to have started a thread named [nioEventLoopGroup-3-4] but has failed to stop it. This is very likely to create a memory leak.
It happens with all containers. The funny thing is that if I debug it then it doesn't happen and of course if I run Moco outside container it works. I have opened an issue to Moco folks to see if they can offer some help but maybe you have found something similar which can clarify if I am doing something wrong.
Thank you so much.
-
5. Re: Arquillian-extension-Moco
asotobu Apr 7, 2014 8:57 AM (in response to asotobu)For example it also works if I add a thread.sleep
public void executeAfterClass(@Observes(precedence = 25) AfterClass afterClass) {
if(jsonRunner != null) {
try {
jsonRunner.stop();
Thread.sleep(3000);
}catch(Exception e) {
System.out.println("DE");
}
}
}
so it seems netty takes some time asynchronously to kill the threads. Is there something from Arquillian part that can be done? Apart of sleeping the current thread of course.