mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
some diagnostics on non-responding p4 process
This commit is contained in:
+11
-1
@@ -19,8 +19,10 @@ import com.intellij.execution.process.CapturingProcessHandler;
|
||||
import com.intellij.execution.process.ProcessOutput;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.StreamUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.util.ExceptionUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -106,7 +108,15 @@ public class TestClientRunner {
|
||||
}
|
||||
|
||||
if (result.isTimeout()) {
|
||||
throw new RuntimeException("Timeout waiting for VCS client to finish execution");
|
||||
String diagnostics = "none";
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec(SystemInfo.isWindows ? System.getenv("windir") +"\\system32\\tasklist.exe /v" : "ps a");
|
||||
diagnostics = StreamUtil.readText(p.getInputStream());
|
||||
}
|
||||
catch (IOException e) {
|
||||
diagnostics = ExceptionUtil.getThrowableText(e);
|
||||
}
|
||||
throw new RuntimeException("Timeout waiting for VCS client to finish execution:\n" + diagnostics);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user