Skip to content

Commit

Permalink
Adapt "kill leader" command to new return type
Browse files Browse the repository at this point in the history
  • Loading branch information
acogoluegnes committed Dec 10, 2021
1 parent 4956812 commit 67c1f36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/rabbitmq/stream/Host.java
Expand Up @@ -98,9 +98,9 @@ public static Process killConnection(String connectionName) throws IOException {

public static Process killStreamLeaderProcess(String stream) throws IOException {
return rabbitmqctl(
"eval 'exit(rabbit_stream_manager:lookup_leader(<<\"/\">>, <<\""
"eval 'case rabbit_stream_manager:lookup_leader(<<\"/\">>, <<\""
+ stream
+ "\">>),kill).'");
+ "\">>) of {ok, Pid} -> exit(Pid, kill); Pid -> exit(Pid, kill) end.'");
}

public static String rabbitmqctlCommand() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/rabbitmq/stream/impl/TestUtils.java
Expand Up @@ -193,7 +193,7 @@ public void accept(Object o) {
try {
task.run(o);
} catch (Exception e) {
throw new RuntimeException();
throw new RuntimeException(e);
}
}

Expand Down

0 comments on commit 67c1f36

Please sign in to comment.