ChrisSamo632 commented on code in PR #7537:
URL: https://github.com/apache/nifi/pull/7537#discussion_r1282108131


##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/test/java/org/apache/nifi/processors/elasticsearch/AbstractPaginatedJsonQueryElasticsearchTest.java:
##########
@@ -0,0 +1,350 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License") you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.elasticsearch;
+
+import org.apache.nifi.processors.elasticsearch.api.AggregationResultsFormat;
+import org.apache.nifi.processors.elasticsearch.api.PaginationType;
+import org.apache.nifi.processors.elasticsearch.api.ResultOutputStrategy;
+import org.apache.nifi.processors.elasticsearch.api.SearchResultsFormat;
+import org.apache.nifi.provenance.ProvenanceEventType;
+import org.apache.nifi.util.MockFlowFile;
+import org.apache.nifi.util.TestRunner;
+import org.junit.jupiter.api.Test;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public abstract class AbstractPaginatedJsonQueryElasticsearchTest extends 
AbstractJsonQueryElasticsearchTest<AbstractPaginatedJsonQueryElasticsearch> {
+   private static final String TEST_DIR = 
"src/test/resources/AbstractPaginatedJsonQueryElasticsearchTest";
+    private static final String MATCH_ALL;
+   private static final String MATCH_ALL_WITH_SORT_BY_MESSAGE;
+   private static final String MATCH_ALL_WITH_SORT_BY_MSG;
+
+   static {
+       try {
+           MATCH_ALL = 
Files.readString(Paths.get("src/test/resources/common/matchAllQuery.json"));
+           MATCH_ALL_WITH_SORT_BY_MESSAGE = 
Files.readString(Paths.get(TEST_DIR, "matchAllWithSortByMessageQuery.json"));
+           MATCH_ALL_WITH_SORT_BY_MSG = 
Files.readString(Paths.get(TEST_DIR,"matchAllWithSortByMsgQueryWithoutSize.json"));
+       } catch (IOException e) {
+           throw new RuntimeException(e);
+       }
+   }

Review Comment:
   Yes, exactly that - you're correct that `super` isn't a thing (my bad), but 
you should be able to refer to 
`AbstractJsonQueryElasticsearchTest.setUpBeforeClass()`



-- 
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]

Reply via email to