exceptionfactory commented on code in PR #10640:
URL: https://github.com/apache/nifi/pull/10640#discussion_r2619344812


##########
nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-processors/src/test/java/org/apache/nifi/processors/jolt/TestJoltTransformRecord.java:
##########
@@ -55,14 +55,18 @@
 import java.util.function.BiFunction;
 import java.util.stream.Stream;
 
+import org.apache.commons.io.FileUtils;
+
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class TestJoltTransformRecord {
 
     final static String CHAINR_SPEC_PATH = 
"src/test/resources/specs/chainrSpec.json";
-    static String chainrSpecContents;
+    private static final String CUSTOM_CLASS_NAME = 
"org.apache.nifi.processors.jolt.TestCustomJoltTransform";
+    private static String chainrSpecContents;
+    private static Path customTransformJar;
+    private static final Path CUSTOM_JAR_DIRECTORY = Paths.get("target", 
"test-custom-jolt", "record");

Review Comment:
   Instead of a static directory, the `TempDir` annotation from JUnit 5 should 
be used.



##########
nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-processors/src/test/java/org/apache/nifi/processors/jolt/TestJoltTransformJSON.java:
##########
@@ -54,15 +57,23 @@ class TestJoltTransformJSON {
     final static String SHIFTR_SPEC_PATH = 
"src/test/resources/specs/shiftrSpec.json";
     final static String SHIFTR_JSON_OUTPUT = "shiftrOutput.json";
     final static String CHAINR_JSON_OUTPUT = "chainrOutput.json";
+    private static final String CUSTOM_CLASS_NAME = 
"org.apache.nifi.processors.jolt.TestCustomJoltTransform";

Review Comment:
   See note on retrieving this from the shared utility class.



##########
nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-processors/src/test/java/org/apache/nifi/processors/jolt/TestJoltTransformRecord.java:
##########
@@ -55,14 +55,18 @@
 import java.util.function.BiFunction;
 import java.util.stream.Stream;
 
+import org.apache.commons.io.FileUtils;
+
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class TestJoltTransformRecord {
 
     final static String CHAINR_SPEC_PATH = 
"src/test/resources/specs/chainrSpec.json";
-    static String chainrSpecContents;
+    private static final String CUSTOM_CLASS_NAME = 
"org.apache.nifi.processors.jolt.TestCustomJoltTransform";

Review Comment:
   To keep the components aligned, it seems like the class name should also 
come from a method in `CustomTransformJarProvider`.



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