|
What I want to do is to run a JUnit test on a class that uses a socket connection to a server, from within an Ant build.xml. Naturally, to test the client socket, it first has to open a serverSocket that waits for input from a client. What's happening is that Ant opens the serverSocket, and then hangs along with the server waiting for input from a client. It doesn't move on to the next task, which is to run the JUnit test.
I thought perhaps that adding 'fork="true"' should do the trick, since (so I understand) it should start both server and client classes in different instances of the JVM. That isn't working, though.
This seems like it should be a pretty routine thing. It works if I open the server manually and then run the JUnit tests. But not from within Ant.
Thanks in advance for any assistance! |