mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use loopback (IDEA-57106)
This commit is contained in:
@@ -108,7 +108,7 @@ public class TestPackage extends TestObject {
|
||||
}
|
||||
|
||||
try {
|
||||
final ServerSocket serverSocket = new ServerSocket(0);
|
||||
final ServerSocket serverSocket = new ServerSocket(0, 0, InetAddress.getByName(null));
|
||||
myJavaParameters.getProgramParametersList().add("-socket" + serverSocket.getLocalPort());
|
||||
findTestsWithProgress(new FindCallback() {
|
||||
public void found(@NotNull final Collection<PsiClass> classes, final boolean isJunit4) {
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.junit3.JUnit3IdeaTestRunner;
|
||||
import com.intellij.rt.execution.junit.segments.SegmentedOutputStream;
|
||||
import junit.textui.TestRunner;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.*;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
@@ -97,7 +98,7 @@ public class JUnitStarter {
|
||||
} else if (arg.startsWith(SOCKET)) {
|
||||
final int port = Integer.parseInt(arg.substring(SOCKET.length()));
|
||||
try {
|
||||
final Socket socket = new Socket(InetAddress.getLocalHost(), port); //start collecting tests
|
||||
final Socket socket = new Socket(InetAddress.getByName(null), port); //start collecting tests
|
||||
final DataInputStream os = new DataInputStream(socket.getInputStream());
|
||||
try {
|
||||
os.readBoolean();//wait for ready flag
|
||||
|
||||
+1
-1
@@ -329,7 +329,7 @@ public class TestNGRunnableState extends JavaCommandLineState {
|
||||
javaParameters.getProgramParametersList().add(TestNGCommandLineArgs.SRC_COMMAND_OPT, sb.toString());
|
||||
}
|
||||
try {
|
||||
final ServerSocket serverSocket = new ServerSocket(0);
|
||||
final ServerSocket serverSocket = new ServerSocket(0, 0, InetAddress.getByName(null));
|
||||
javaParameters.getProgramParametersList().add("-socket" + serverSocket.getLocalPort());
|
||||
myTempFile = File.createTempFile("idea_testng", ".tmp");
|
||||
myTempFile.deleteOnExit();
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RemoteTestNGStarter {
|
||||
if (arg.startsWith(SOCKET)) {
|
||||
final int port = Integer.parseInt(arg.substring(SOCKET.length()));
|
||||
try {
|
||||
final Socket socket = new Socket(InetAddress.getLocalHost(), port); //start collecting tests
|
||||
final Socket socket = new Socket(InetAddress.getByName(null), port); //start collecting tests
|
||||
final DataInputStream os = new DataInputStream(socket.getInputStream());
|
||||
try {
|
||||
os.readBoolean();//wait for ready flag
|
||||
|
||||
Reference in New Issue
Block a user