Hi, I’m currently struggling to get some integration-tests running and have stumbled over something that i might think could be a problem.
Then using the tomee-maven-plugin 1.7.0 to start tomee before my tests, this works fine. After my tests I have maven call the stop goal. It seems tomee is correctly shut down (All ports are closed and processes killed), but the plugin seemed to be waiting for ages. To me it seems the StopTomEEMojo calls server.forceStop to stop TomEE this then issues the server stop and goes into waitForServerShutdown() This method now tries to connect to the shutdown port of tomcat for MAXINT times. If the connection is successful the socket is closed again and true is returned and waitForServerShutdown while loop just calls it again. When looking at that method, to me it seems that the only option in which the while loop in RemoteServer.waitForServerShutdown() can end, is that the plugin has waited MAXINT seconds and has opened MAXINT sockets. Why do you do that much recursion anyway? To me a simple while loop would have made sense here. In my case the first connection attempt already fails, but even if if didn’t that wouldn’t change the fact that I have to wait almost 70 years for my test suite to finish ;-) Am I doing something wrong or does this code sort of smell a little strange? Chris
signature.asc
Description: Message signed with OpenPGP using GPGMail
