Skip to content

Commit db8ca04

Browse files
Fix logstash plugin unit test error (#62348)
1 parent 3e9442b commit db8ca04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/logstash/src/test/java/org/elasticsearch/xpack/logstash/action/GetPipelineRequestTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ protected GetPipelineRequest createTestInstance() {
2828
@Override
2929
protected GetPipelineRequest mutateInstance(GetPipelineRequest instance) {
3030
List<String> ids = new ArrayList<>(instance.ids());
31-
if (randomBoolean()) {
31+
if (randomBoolean() || ids.size() == 0) {
3232
// append another ID
3333
ids.add(randomAlphaOfLengthBetween(2, 10));
3434
} else {
35+
// change the strings in the request
3536
ids = ids.stream().map(id -> id + randomAlphaOfLength(1)).collect(Collectors.toList());
3637
}
3738
return new GetPipelineRequest(ids);

0 commit comments

Comments
 (0)