exceptionfactory commented on code in PR #6687:
URL: https://github.com/apache/nifi/pull/6687#discussion_r1052613032
##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service/src/test/java/org/apache/nifi/elasticsearch/integration/ElasticSearchClientService_IT.java:
##########
@@ -205,19 +206,29 @@ void testVerifyFailedApiKeyAuth() {
@Test
void testBasicSearch() throws Exception {
+ assertBasicSearch(null);
+ }
+
+ @Test
+ void testBasicSearchRequestParameters() throws Exception {
+ assertBasicSearch(createParameters("preference", "_local"));
+ }
+
+ private void assertBasicSearch(final Map<String, String>
requestParameters) throws JsonProcessingException {
final Map<String, Object> temp = new MapBuilder()
- .of("size", 10, "query", new MapBuilder().of("match_all", new
HashMap<>()).build(),
- "aggs", new MapBuilder()
- .of("term_counts", new MapBuilder()
- .of("terms", new MapBuilder()
- .of("field", "msg", "size", 5)
- .build())
- .build())
- .build())
+ .of("size", 10, "query", new MapBuilder().of("match_all", new
HashMap<>()).build(),
Review Comment:
Recommend using `LinkedHashMap`:
```suggestion
.of("size", 10, "query", new MapBuilder().of("match_all",
new LinkedHashMap<>()).build(),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]