From b7c15c360b63c717c7de0e724573a24b3b346d85 Mon Sep 17 00:00:00 2001 From: Matt Burgess Date: Wed, 3 May 2017 10:10:02 -0400 Subject: [PATCH] NIFI-3718: Fixed timezone issue in TestAvroReaderWithEmbeddedSchema This closes #1738 --- .../org/apache/nifi/avro/TestAvroReaderWithEmbeddedSchema.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestAvroReaderWithEmbeddedSchema.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestAvroReaderWithEmbeddedSchema.java index da9f70be5d..d315b2ef14 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestAvroReaderWithEmbeddedSchema.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestAvroReaderWithEmbeddedSchema.java @@ -109,7 +109,7 @@ public class TestAvroReaderWithEmbeddedSchema { assertEquals(new java.sql.Timestamp(timeLong), record.getValue("timestampMicros")); final DateFormat noTimeOfDayDateFormat = new SimpleDateFormat("yyyy-MM-dd"); noTimeOfDayDateFormat.setTimeZone(TimeZone.getTimeZone("gmt")); - assertEquals(new java.sql.Date(timeLong).toString(), noTimeOfDayDateFormat.format(record.getValue("date"))); + assertEquals(noTimeOfDayDateFormat.format(new java.sql.Date(timeLong)), noTimeOfDayDateFormat.format(record.getValue("date"))); } }