stankiewicz commented on code in PR #37791:
URL: https://github.com/apache/beam/pull/37791#discussion_r2966222242
##########
sdks/java/io/common/src/main/java/org/apache/beam/sdk/io/common/DatabaseTestHelper.java:
##########
@@ -138,9 +138,10 @@ public static void deleteTable(DataSource dataSource,
String tableName) throws S
}
public static String getTestTableName(String testIdentifier) {
- SimpleDateFormat formatter = new SimpleDateFormat();
- formatter.applyPattern("yyyy_MM_dd_HH_mm_ss_S");
- return String.format("BEAMTEST_%s_%s", testIdentifier,
formatter.format(new Date()));
+ java.time.format.DateTimeFormatter formatter =
+
java.time.format.DateTimeFormatter.ofPattern("yyyy_MM_dd_HH_mm_ss_SSS");
Review Comment:
In the legacy SimpleDateFormat, S represents milliseconds.
In the modern java.time.format.DateTimeFormatter, S represents a
fraction-of-second.
--
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]