Skip to content

Commit

Permalink
Handle null exception message in TestCluster#wipe (#112741)
Browse files Browse the repository at this point in the history
Fixing noise seen in an unrelated test failure.
  • Loading branch information
DaveCTurner authored Sep 11, 2024
1 parent 281ee04 commit cd3d664
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Objects;
import java.util.Random;
import java.util.Set;

Expand Down Expand Up @@ -91,7 +92,7 @@ public void wipe(Set<String> excludeTemplates) {
l.delegateResponse((ll, e) -> {
// Ignore if action isn't registered, because data streams is a module and
// if the delete action isn't registered then there no data streams to delete.
if (e.getMessage().startsWith("failed to find action") == false) {
if (Objects.requireNonNullElse(e.getMessage(), "").startsWith("failed to find action") == false) {
ll.onFailure(e);
} else {
ll.onResponse(AcknowledgedResponse.TRUE);
Expand Down

0 comments on commit cd3d664

Please sign in to comment.