Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

junit socket error

2 views
Skip to first unread message

MileHighCelt

unread,
Sep 14, 2005, 12:22:19 PM9/14/05
to
I am using JUnit 3.8.1 (that came with Eclipse 3.1) to run some tests.
Yesterday everything was fine, but this morning after rebooting my
windows box, none of my tests will run. When I click the test class
and select "run as junit test" it takes 10-15 seconds before throwing
an exception such as:

Could not connect to: : 2248
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:754)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:336)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

It is interesting that the port noted at the beginning of this message
increments after each attempt (it was originally 1989 when I noticed
it). Anyone know why this might suddenly be happening. I am not
trying to run any remote applications, so I don't know why junit is
trying to open sockets to various ports.

Thanks for your help.

Roedy Green

unread,
Sep 14, 2005, 3:32:17 PM9/14/05
to
On 14 Sep 2005 09:22:19 -0700, "MileHighCelt" <humbl...@yahoo.com>
wrote or quoted :

>It is interesting that the port noted at the beginning of this message
>increments after each attempt (it was originally 1989 when I noticed
>it). Anyone know why this might suddenly be happening. I am not
>trying to run any remote applications, so I don't know why junit is
>trying to open sockets to various ports.

Eclipse has a auto update feature. You might check that your Internet
connection is functioning. You also might check that the connection to
your Eclipse mirror is working and the mirror site is up. If not, pick
a different mirror.

Click Help | software updates
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Oliver Wong

unread,
Sep 15, 2005, 3:06:16 PM9/15/05
to

"MileHighCelt" <humbl...@yahoo.com> wrote in message
news:1126714939.7...@o13g2000cwo.googlegroups.com...

I've encountered this error too, and unfortunatelly I really cannot
remember what I did to fix it.

However, it's my understanding that the JUnit uses sockets to connect to
itself so that the GUI component (i.e. the progress bar that shows up in
Eclipse) can communicate with the backend (the code that actually runs all
the tests). So this has nothing to do with whether or not YOUR code uses
sockets.

Did you try rebooting the computer since the error started happening?

- Oliver


0 new messages