You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/08/05 22:36:41 UTC

[GitHub] [nifi] emiliosetiadarma commented on a diff in pull request #6272: NIFI-10307: refactored tests in nifi-standard-processors to use JUnit 5

emiliosetiadarma commented on code in PR #6272:
URL: https://github.com/apache/nifi/pull/6272#discussion_r939429675


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestQueryRecord.java:
##########
@@ -50,27 +52,36 @@
 import java.time.LocalDate;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
-import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class TestQueryRecord {
 
-    static {
+    @BeforeAll
+    public static void setup() {
         System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "info");
         System.setProperty("org.slf4j.simpleLogger.showDateTime", "true");
         System.setProperty("org.slf4j.simpleLogger.log.nifi.io.nio", "debug");
         System.setProperty("org.slf4j.simpleLogger.log.org.apache.nifi.processors.standard.SQLTransform", "debug");
     }
 
+    @AfterAll
+    public static void cleanup() {
+        System.clearProperty("org.slf4j.simpleLogger.defaultLogLevel");
+        System.clearProperty("org.slf4j.simpleLogger.showDateTime");
+        System.clearProperty("org.slf4j.simpleLogger.log.nifi.io.nio");
+        System.clearProperty("org.slf4j.simpleLogger.log.org.apache.nifi.processors.standard.SQLTransform");
+    }

Review Comment:
   Making the changes



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org