This explanation is more in line with what I found.  I'm not sure
either why the socket connection works.  I've tried to add a sleep
between the suspend and connect but to no avail.

2009/2/24 Emmanuel Lecharny <elecha...@apache.org>:
> Ok, I have been able to go a bit further on Windows.
>
> The slector.keys().isEmpty() returns true too, so we also exit from
> the server acceptor loop.
>
> When the client tries to connect again, it can't and an exception is
> thrown (which is expected).
>
> As far as I remember, on mac, this is where the test blcok : the
>
>        try {
>            client.connect("localhost", port);
>
> code waits forever, when it should get out immediately with this exception :
>
>
> java.net.ConnectException: Connection refused: connect
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>        at java.net.PlainSocketImpl.doConnect(Unknown Source)
>        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>        at java.net.PlainSocketImpl.connect(Unknown Source)
>        at java.net.SocksSocketImpl.connect(Unknown Source)
>        at java.net.Socket.connect(Unknown Source)
>        at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
>        at 
> org.apache.ftpserver.clienttests.SuspendResumeTest.testSuspendResumeServer(SuspendResumeTest.java:46)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at junit.framework.TestCase.runTest(TestCase.java:164)
>        at junit.framework.TestCase.runBare(TestCase.java:130)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:120)
>        at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>        at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>        at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>        at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>        at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>        at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
> For some reason, it does not ... Why ???
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to