From 7097f4943c03420d9a7332d043438e215d8ea52d Mon Sep 17 00:00:00 2001 From: javanna Date: Fri, 16 Sep 2016 11:11:24 +0200 Subject: [PATCH] [TEST] delete specific index boost serialization test, already covered by testSerialization indexBoost is already randomly set, we don't need a specific test for it in SearchSourceBuilderTests --- .../builder/SearchSourceBuilderTests.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java b/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java index 43ea81e993c..967af3d3afc 100644 --- a/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java @@ -326,25 +326,4 @@ public class SearchSourceBuilderTests extends AbstractSearchTestCase { String query = "{ \"query\": {} }"; assertParseSearchSource(builder, new BytesArray(query), ParseFieldMatcher.EMPTY); } - - public void testSearchRequestBuilderSerializationWithIndexBoost() throws Exception { - SearchSourceBuilder searchSourceBuilder = createSearchSourceBuilder(); - createIndexBoost(searchSourceBuilder); - try (BytesStreamOutput output = new BytesStreamOutput()) { - searchSourceBuilder.writeTo(output); - try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(), namedWriteableRegistry)) { - SearchSourceBuilder deserializedSearchSourceBuilder = new SearchSourceBuilder(in); - BytesStreamOutput deserializedOutput = new BytesStreamOutput(); - deserializedSearchSourceBuilder.writeTo(deserializedOutput); - assertEquals(output.bytes(), deserializedOutput.bytes()); - } - } - } - - private static void createIndexBoost(SearchSourceBuilder searchSourceBuilder) { - int indexBoostSize = randomIntBetween(1, 10); - for (int i = 0; i < indexBoostSize; i++) { - searchSourceBuilder.indexBoost(randomAsciiOfLengthBetween(5, 20), randomFloat() * 10); - } - } }