matriv commented on code in PR #19302:
URL: https://github.com/apache/flink/pull/19302#discussion_r842760779


##########
flink-connectors/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/table/IndexGeneratorFactoryTest.java:
##########
@@ -193,12 +202,24 @@ public void testDynamicIndexFromSystemTime() {
     }
 
     @Test
-    public void testDynamicIndexDefaultFormatTimestampWithLocalTimeZone() {
+    public void testDynamicIndexDefaultFormatTimestampWithLocalTimeZoneUTC() {
+        assumeThat(ZoneId.systemDefault(), is(ZoneId.of("UTC")));
+
         IndexGenerator indexGenerator =
                 
IndexGeneratorFactory.createIndexGenerator("my-index-{local_timestamp|}", 
schema);
         indexGenerator.open();
-        Assert.assertEquals("my-index-2020_03_18_12_12_14Z", 
indexGenerator.generate(rows.get(0)));
-        Assert.assertEquals("my-index-2020_03_19_12_12_14Z", 
indexGenerator.generate(rows.get(1)));
+        Assert.assertEquals("my-index-2020_03_17_19_12_14Z", 
indexGenerator.generate(rows.get(0)));
+        Assert.assertEquals("my-index-2020_03_20_03_22_14Z", 
indexGenerator.generate(rows.get(1)));
+    }
+
+    @Test
+    public void 
testDynamicIndexDefaultFormatTimestampWithLocalTimeZoneWithSpecificTimeZone() {
+        IndexGenerator indexGenerator =
+                IndexGeneratorFactory.createIndexGenerator(
+                        "my-index-{local_timestamp|}", schema, 
ZoneId.of("UTC"));

Review Comment:
   Same here, "Europe/Berlin", otherwise we are again testing only "UTC".



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