Skip to content

Commit

Permalink
Re-enable nodes usage tests and update serialization version (#56051)
Browse files Browse the repository at this point in the history
Updates the serialization version and re-enables bwc tests for nodes
usage api after backport of #55732
  • Loading branch information
imotov committed Apr 30, 2020
1 parent ee59746 commit 1c80e85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@

---
"Verify nodes usage works":
- skip:
version: "all"
reason: "for backport"
- do:
nodes.usage: {}
- is_true: nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public NodeUsage(StreamInput in) throws IOException {
timestamp = in.readLong();
sinceTime = in.readLong();
restUsage = (Map<String, Long>) in.readGenericValue();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
aggregationUsage = (Map<String, Object>) in.readGenericValue();
} else {
aggregationUsage = null;
Expand Down Expand Up @@ -121,7 +121,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeLong(timestamp);
out.writeLong(sinceTime);
out.writeGenericValue(restUsage);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeGenericValue(aggregationUsage);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class NodesUsageRequest extends BaseNodesRequest<NodesUsageRequest> {
public NodesUsageRequest(StreamInput in) throws IOException {
super(in);
this.restActions = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
this.aggregations = in.readBoolean();
}
}
Expand Down Expand Up @@ -99,7 +99,7 @@ public NodesUsageRequest aggregations(boolean aggregations) {
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeBoolean(restActions);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeBoolean(aggregations);
}
}
Expand Down

0 comments on commit 1c80e85

Please sign in to comment.