Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Sep 23, 2024
1 parent 7c8a24c commit ab5d9dc
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.features.FeatureService;
import org.elasticsearch.injection.guice.Inject;
import org.elasticsearch.rest.RestController;
Expand Down Expand Up @@ -151,6 +152,10 @@ public NodeCapabilitiesRequest(
this.restApiVersion = restApiVersion;
}

@UpdateForV9 // 8.x blows up in a mixed cluster when trying to read RestApiVersion.forMajor(9)
// ./gradlew ":qa:mixed-cluster:v8.16.0#mixedClusterTest"
// -Dtests.class="org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT"
// -Dtests.method="test {p0=capabilities/10_basic/Capabilities API}"
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
Expand All @@ -159,7 +164,9 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(path);
out.writeCollection(parameters, StreamOutput::writeString);
out.writeCollection(capabilities, StreamOutput::writeString);
out.writeVInt(restApiVersion.major);
// Fixme: lies! all lies!
out.writeVInt(8);
// out.writeVInt(restApiVersion.major);
}
}
}

0 comments on commit ab5d9dc

Please sign in to comment.