Bug 19859 [JUnit] Socket connection error
I'll provide more specifics as I come across them. Sorry for the sparse detail. Sometimes (but not always) when I Run.. or Debug.. a JUnit launcher, I get the following exception: Console [<disconnected> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at localHost:9613] Could not connect to: : 6293 java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148) at java.net.Socket.connect(Socket.java:425) at java.net.Socket.connect(Socket.java:375) at java.net.Socket.<init>(Socket.java:290) at java.net.Socket.<init>(Socket.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:440) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:210) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151) Could be related to one of the following: **I'm running a dual head linux systems via xinerama, but other apps have not had any difficulty. **I'm suspicious that the problem occurs when I have more than one perspective open in different windows, OR when using Debug... would cause a new perspective to be started.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java
}
				fTestClassNames= (String[]) list.toArray(new String[list.size()]);
			}		
			else if(args[i].toLowerCase().equals("-port")) { 
				fPort= Integer.parseInt(args[i+1]);
			}
			else if(args[i].toLowerCase().equals("-host")) { 
				fHost= args[i+1];
			}
			else if(args[i].toLowerCase().equals("-keepalive")) { 
				fKeepAlive= true;
			}
			else if(args[i].toLowerCase().equals("-debugging") || args[i].toLowerCase().equals("-debug")){ 
				fDebugMode= true;
			}
		}
		if(fTestClassNames == null || fTestClassNames.length == 0)
			throw new IllegalArgumentException(JUnitMessages.getString("RemoteTestRunner.error.classnamemissing")); 
		if (fPort == -1)
			throw new IllegalArgumentException(JUnitMessages.getString("RemoteTestRunner.error.portmissing")); 
		if (fDebugMode)
			System.out.println("keepalive "+fKeepAlive); 
	}
	
	/**
	 * Connects to the remote ports and runs the tests.
	 */
	protected void run() {
		if (!connect()) {
			return;