junit: prepare to debug in fork mode

This commit is contained in:
Anna Kozlova
2015-05-05 20:54:52 +02:00
parent 168b50ca89
commit b4724d371a
4 changed files with 46 additions and 5 deletions
@@ -201,6 +201,7 @@ public abstract class JavaTestFrameworkRunnableState<T extends ModuleBasedConfig
return javaParameters;
}
protected ServerSocket myForkSocket;
protected void appendForkInfo(Executor executor) throws ExecutionException {
final String forkMode = getForkMode();
if (Comparing.strEqual(forkMode, "none")) {
@@ -250,6 +251,9 @@ public abstract class JavaTestFrameworkRunnableState<T extends ModuleBasedConfig
writer.close();
}
if (getRunnerSettings() instanceof DebuggingRunnerData) {
myForkSocket = new ServerSocket(0, 0, InetAddress.getByName("127.0.0.1"));
}
passForkMode(forkMode, tempFile);
}
catch (Exception e) {