Skip to content

Commit

Permalink
Fix some test methods in SimulatePipelineRequestParsingTests never ru…
Browse files Browse the repository at this point in the history
…n and fix test failure (#10496) (#10631)

* Fix some test methods in SimulatePipelineRequestParsingTests never run and fix test failure

Signed-off-by: Gao Binlong <[email protected]>

* Modify changelog

Signed-off-by: Gao Binlong <[email protected]>

---------

Signed-off-by: Gao Binlong <[email protected]>
(cherry picked from commit a43a166)
  • Loading branch information
gaobinlong authored Oct 17, 2023
1 parent b188ee6 commit 6144217
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void init() throws IOException {
when(ingestService.getProcessorFactories()).thenReturn(registry);
}

public void testParseUsingPipelineStore(boolean useExplicitType) throws Exception {
public void testParseUsingPipelineStore() throws Exception {
int numDocs = randomIntBetween(1, 10);

Map<String, Object> requestContent = new HashMap<>();
Expand Down Expand Up @@ -131,7 +131,7 @@ public void testParseUsingPipelineStore(boolean useExplicitType) throws Exceptio
assertThat(actualRequest.getPipeline().getProcessors().size(), equalTo(1));
}

public void innerTestParseWithProvidedPipeline() throws Exception {
public void testParseWithProvidedPipeline() throws Exception {
int numDocs = randomIntBetween(1, 10);

Map<String, Object> requestContent = new HashMap<>();
Expand All @@ -149,9 +149,9 @@ public void innerTestParseWithProvidedPipeline() throws Exception {
doc.put(field.getFieldName(), value);
expectedDoc.put(field.getFieldName(), value);
} else {
Integer value = randomIntBetween(1, 1000000);
int value = randomIntBetween(1, 1000000);
doc.put(field.getFieldName(), value);
expectedDoc.put(field.getFieldName(), value);
expectedDoc.put(field.getFieldName(), (long) value);
}
} else if (field == VERSION_TYPE) {
String value = VersionType.toString(randomFrom(VersionType.INTERNAL, VersionType.EXTERNAL, VersionType.EXTERNAL_GTE));
Expand All @@ -163,9 +163,9 @@ public void innerTestParseWithProvidedPipeline() throws Exception {
doc.put(field.getFieldName(), value);
expectedDoc.put(field.getFieldName(), value);
} else {
Integer value = randomIntBetween(1, 1000000);
int value = randomIntBetween(1, 1000000);
doc.put(field.getFieldName(), value);
expectedDoc.put(field.getFieldName(), value);
expectedDoc.put(field.getFieldName(), (long) value);
}
} else {
if (randomBoolean()) {
Expand Down

0 comments on commit 6144217

Please sign in to comment.