Skip to content

Commit

Permalink
Adjust bwc version
Browse files Browse the repository at this point in the history
  • Loading branch information
dnhatn authored and Gurkan Kaymak committed May 27, 2019
1 parent cd56af0 commit 65d5cb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void readFrom(StreamInput in) throws IOException {
if (in.getVersion().onOrAfter(Version.V_7_2_0)) {
readShardsAcknowledged(in);
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_3_0)) {
indices = unmodifiableList(in.readList(IndexResult::new));
} else {
indices = unmodifiableList(emptyList());
Expand All @@ -73,7 +73,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_7_2_0)) {
writeShardsAcknowledged(out);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_3_0)) {
out.writeList(indices);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void testBwcSerialization() throws Exception {
}
assertThat(deserializedResponse.isAcknowledged(), equalTo(response.isAcknowledged()));
assertThat(deserializedResponse.isShardsAcknowledged(), equalTo(response.isShardsAcknowledged()));
if (version.onOrAfter(Version.V_8_0_0)) {
if (version.onOrAfter(Version.V_7_3_0)) {
assertThat(deserializedResponse.getIndices(), hasSize(response.getIndices().size()));
} else {
assertThat(deserializedResponse.getIndices(), empty());
Expand Down

0 comments on commit 65d5cb7

Please sign in to comment.