matriv commented on a change in pull request #18058:
URL: https://github.com/apache/flink/pull/18058#discussion_r772255153



##########
File path: 
flink-connectors/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/connector/elasticsearch/table/ElasticsearchDynamicSinkBaseITCase.java
##########
@@ -302,6 +306,58 @@ public void testWritingDocumentsWithDynamicIndex() throws 
Exception {
         Assertions.assertEquals(response, expectedMap);
     }
 
+    @Test
+    public void testWritingDocumentsWithDynamicIndexFromProcTime() throws 
Exception {
+        TableEnvironment tableEnvironment =
+                TableEnvironment.create(EnvironmentSettings.inStreamingMode());
+
+        DateTimeFormatter dateTimeFormatter = 
DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        tableEnvironment
+                .getConfig()
+                .getConfiguration()
+                .setString("table.local-time-zone", "Asia/Shanghai");
+
+        String dynamicIndex1 =
+                "dynamic-index-"
+                        + 
dateTimeFormatter.format(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
+        String index = "dynamic-index-{now()|yyyy-MM-dd}";

Review comment:
       Could you please use a suffix here to test this case as well?




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