Skip to content

Commit 40495f5

Browse files
Artem LabazinArtem Labazin
authored andcommitted
Fix local tests
1 parent a084431 commit 40495f5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

client/src/test/java/io/appulse/epmd/java/client/util/LocalEpmdHelper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public static void kill () {
7373
if (!isRunning()) {
7474
return;
7575
}
76-
val pid = getEpmdPid();
77-
val builder = new ProcessBuilder("kill", "-9", Integer.toString(pid));
76+
val pids = getEpmdPids();
77+
val builder = new ProcessBuilder("kill", "-9", pids);
7878
val process = builder.start();
7979
if (!process.waitFor(1, MINUTES)) {
8080
process.destroy();
@@ -98,7 +98,7 @@ public static boolean isRunning () {
9898
}
9999

100100
@SneakyThrows
101-
private static int getEpmdPid () {
101+
private static String getEpmdPids () {
102102
val builder = new ProcessBuilder("pgrep", "-f", "epmd");
103103
val process = builder.start();
104104
if (!process.waitFor(1, MINUTES)) {
@@ -114,10 +114,10 @@ private static int getEpmdPid () {
114114
try (val reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
115115
String line;
116116
while ((line = reader.readLine()) != null) {
117-
result.append(line).append('\n');
117+
result.append(line).append(' ');
118118
}
119119
}
120-
return Integer.parseInt(result.toString().trim());
120+
return result.toString().trim();
121121
}
122122

123123
private LocalEpmdHelper () {

0 commit comments

Comments
 (0)