Skip to content

Commit 1c157dc

Browse files
authored
Fix NPE in CatShardsRequestTests on version bump (opensearch-project#16590)
Signed-off-by: Daniel Widdis <widdis@gmail.com>
1 parent 5094f92 commit 1c157dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/test/java/org/opensearch/action/admin/cluster/shards/CatShardsRequestTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void testSerializationWithOlderVersionsParametersNotSerialized() throws E
9595
catShardsRequest.setCancelAfterTimeInterval(TimeValue.timeValueMillis(randomIntBetween(1, 5)));
9696
catShardsRequest.setIndices(new String[2]);
9797

98-
Version version = VersionUtils.getPreviousVersion(Version.CURRENT);
98+
Version version = VersionUtils.getPreviousVersion(Version.V_2_18_0);
9999
try (BytesStreamOutput out = new BytesStreamOutput()) {
100100
out.setVersion(version);
101101
catShardsRequest.writeTo(out);

0 commit comments

Comments
 (0)