mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Extend test and replace Log.info with Log.error
GitOrigin-RevId: e461d2e46edc9ee3c0e4a21b8cff7fd300c4792b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7706ccf4e1
commit
4efd4683bc
+11
-4
@@ -210,13 +210,16 @@ public class ProcessListUtilTest extends TestCase {
|
||||
List<ProcessInfo> infos = ProcessListUtil.parseWinProcessListHelperOutput(
|
||||
"19608\n" +
|
||||
"SourceTree.exe\n" +
|
||||
"\"C:\\Users\\grahams\\AppData\\Local\\SourceTree\\app-3.1.3\\SourceTree.exe\" \n" +
|
||||
"\"\"C:\\\\Users\\\\grahams\\\\AppData\\\\Local\\\\SourceTree\\\\app-3.1.3\\\\SourceTree.exe\"\"\n" +
|
||||
"12300\n" +
|
||||
"conhost.exe\n" +
|
||||
"\\??\\C:\\Windows\\system32\\conhost.exe 0x4\n" +
|
||||
"\"\\\\??\\\\C:\\\\Windows\\\\system32\\\\conhost.exe 0x4\"\n" +
|
||||
"26284\n" +
|
||||
"Unity Hub.exe\n" +
|
||||
"\"C:\\Program Files\\Unity Hub\\Unity Hub.exe\" --no-sandbox --lang=en-US --node-integration=true /prefetch:1\n"
|
||||
"\"\"C:\\\\Program Files\\\\Unity Hub\\\\Unity Hub.exe\" --no-sandbox --lang=en-US --node-integration=true /prefetch:1\"\n" +
|
||||
"25064\n" +
|
||||
"cmd.exe\n" +
|
||||
"\"\"C:\\\\WINDOWS\\\\system32\\\\cmd.exe\" /c \"pause\\necho 123\"\"\n"
|
||||
);
|
||||
assertOrderedEquals(
|
||||
infos,
|
||||
@@ -225,7 +228,11 @@ public class ProcessListUtilTest extends TestCase {
|
||||
new ProcessInfo(26284,
|
||||
"\"C:\\Program Files\\Unity Hub\\Unity Hub.exe\" --no-sandbox --lang=en-US --node-integration=true /prefetch:1",
|
||||
"Unity Hub.exe",
|
||||
"--no-sandbox --lang=en-US --node-integration=true /prefetch:1")
|
||||
"--no-sandbox --lang=en-US --node-integration=true /prefetch:1"),
|
||||
new ProcessInfo(25064,
|
||||
"\"C:\\WINDOWS\\system32\\cmd.exe\" /c \"pause\necho 123\"",
|
||||
"cmd.exe",
|
||||
"/c \"pause\necho 123\"")
|
||||
);
|
||||
|
||||
assertNull(ProcessListUtil.parseWinProcessListHelperOutput(""));
|
||||
|
||||
+2
-2
@@ -271,7 +271,7 @@ public final class ProcessListUtil {
|
||||
String[] lines = StringUtil.splitByLines(output, false);
|
||||
List<ProcessInfo> result = new ArrayList<>();
|
||||
if (lines.length % 3 != 0) {
|
||||
LOG.info("Broken output of " + WIN_PROCESS_LIST_HELPER_FILENAME + ": output line count is not a multiple of 3");
|
||||
LOG.error("Broken output of " + WIN_PROCESS_LIST_HELPER_FILENAME + ": output line count is not a multiple of 3");
|
||||
LOG.debug(output);
|
||||
return null;
|
||||
}
|
||||
@@ -280,7 +280,7 @@ public final class ProcessListUtil {
|
||||
int offset = i * 3;
|
||||
int id = StringUtil.parseInt(lines[offset], -1);
|
||||
if (id == -1) {
|
||||
LOG.info("Broken output of " + WIN_PROCESS_LIST_HELPER_FILENAME + ": process ID is not a number: " + lines[offset]);
|
||||
LOG.error("Broken output of " + WIN_PROCESS_LIST_HELPER_FILENAME + ": process ID is not a number: " + lines[offset]);
|
||||
LOG.debug(output);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user