Hello Geoffrey,

this problem has already ben reported. This behaviour may depend on the server connector your are using when running your tests.
For example (I quote a previous thread):

Simple 3.1 doesn't have any way to do a clean shutdown of a server. When
stop() is called, we can only close the socket. This was reported several
times in their mailing and are planning to fix this in their next release.


Jetty seems to be a better alternative.
What kind of server connector are your using?
best regards,
Thierry Boileau

I've got a series of tests which use component.start() before the test run and component.stop() after the test run.

Most of the time, these all run. In a particular scenario (usually when run as a batch through Eclipse), I find that I get an Address in Use java.net.BindException.

Is it possible that stop() is exiting while the address is still bound? Is there any way to ensure that the server is well and truly stopped before proceeding? I'd hate to put waits in the tests.

Alternately -- is it more common to use isolated non-integration tests of resources?

Thanks,

  - Geoffrey
--
Geoffrey Wiseman

Reply via email to