diff --git a/nifi-commons/nifi-record-path/src/test/java/org/apache/nifi/record/path/TestRecordPath.java b/nifi-commons/nifi-record-path/src/test/java/org/apache/nifi/record/path/TestRecordPath.java index 100861fd2b..db3b13b786 100644 --- a/nifi-commons/nifi-record-path/src/test/java/org/apache/nifi/record/path/TestRecordPath.java +++ b/nifi-commons/nifi-record-path/src/test/java/org/apache/nifi/record/path/TestRecordPath.java @@ -79,7 +79,9 @@ public class TestRecordPath { @AfterAll public static void setSystemTimezone() { - System.setProperty(USER_TIMEZONE_PROPERTY, SYSTEM_TIMEZONE); + if (SYSTEM_TIMEZONE != null) { + System.setProperty(USER_TIMEZONE_PROPERTY, SYSTEM_TIMEZONE); + } } @Test diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestConvertRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestConvertRecord.java index a85e61ca81..47477b04ca 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestConvertRecord.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestConvertRecord.java @@ -405,7 +405,9 @@ public class TestConvertRecord { assertTrue(avroStream.hasNext()); assertEquals(1, avroStream.next().get("date")); // see https://avro.apache.org/docs/1.10.0/spec.html#Date } finally { - System.setProperty("user.timezone", timezone); + if (timezone != null) { + System.setProperty("user.timezone", timezone); + } } } }