Skip to content

Commit

Permalink
Update test version guard
Browse files Browse the repository at this point in the history
Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Andrew Ross <[email protected]>
  • Loading branch information
andrross and reta committed Feb 22, 2024
1 parent 0aae97b commit 56d080a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
setup:
- skip:
version: " - 2.12.0"
reason: "implemented for versions post 2.12.0"
version: " - 2.12.99"
reason: "implemented for versions post 2.12.99"

---
"matched queries":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void testFromXContentLenientParsing() throws IOException {

public void testSerializationDeserializationWithMatchedQueriesScores() throws IOException {
SearchHit searchHit = createTestItemWithMatchedQueriesScores(true, true);
SearchHit deserializedSearchHit = copyWriteable(searchHit, getNamedWriteableRegistry(), SearchHit::new, Version.V_3_0_0);
SearchHit deserializedSearchHit = copyWriteable(searchHit, getNamedWriteableRegistry(), SearchHit::new, Version.V_2_13_0);
assertEquals(searchHit, deserializedSearchHit);
assertEquals(searchHit.getMatchedQueriesAndScores(), deserializedSearchHit.getMatchedQueriesAndScores());
}
Expand Down Expand Up @@ -313,7 +313,7 @@ public void testSerializeShardTargetWithNewVersion() throws Exception {

SearchHits hits = new SearchHits(new SearchHit[] { hit1, hit2 }, new TotalHits(2, TotalHits.Relation.EQUAL_TO), 1f);

SearchHits results = copyWriteable(hits, getNamedWriteableRegistry(), SearchHits::new, Version.V_3_0_0);
SearchHits results = copyWriteable(hits, getNamedWriteableRegistry(), SearchHits::new, Version.V_2_13_0);
SearchShardTarget deserializedTarget = results.getAt(0).getShard();
assertThat(deserializedTarget, equalTo(target));
assertThat(results.getAt(0).getInnerHits().get("1").getAt(0).getShard(), notNullValue());
Expand Down Expand Up @@ -369,7 +369,7 @@ public void testSerializeShardTargetWithNewVersionAndMatchedQueries() throws Exc

SearchHits hits = new SearchHits(new SearchHit[] { hit1, hit2 }, new TotalHits(2, TotalHits.Relation.EQUAL_TO), 1f);

SearchHits results = copyWriteable(hits, getNamedWriteableRegistry(), SearchHits::new, Version.V_3_0_0);
SearchHits results = copyWriteable(hits, getNamedWriteableRegistry(), SearchHits::new, Version.V_2_13_0);
SearchShardTarget deserializedTarget = results.getAt(0).getShard();
assertThat(deserializedTarget, equalTo(target));
assertThat(results.getAt(0).getInnerHits().get("1").getAt(0).getShard(), notNullValue());
Expand Down

0 comments on commit 56d080a

Please sign in to comment.