Skip to content

Commit 9c0cc3f

Browse files
committed
fix: ut failed in different timezone
1 parent 8f2263c commit 9c0cc3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-maxcompute/src/test/java/org/apache/flink/cdc/connectors/maxcompute/utils/TypeConvertUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void testRecordConvert() {
167167
123456.789d,
168168
12345,
169169
12345,
170-
TimestampData.fromTimestamp(Timestamp.from(Instant.ofEpochSecond(0))),
170+
TimestampData.fromTimestamp(Timestamp.valueOf("1970-01-01 00:00:00")),
171171
LocalZonedTimestampData.fromInstant(Instant.ofEpochSecond(0)),
172172
ZonedTimestampData.fromZonedDateTime(
173173
ZonedDateTime.ofInstant(
@@ -179,7 +179,7 @@ public void testRecordConvert() {
179179
TypeConvertUtils.toMaxComputeRecord(schemaWithoutComplexType, record1, arrayRecord);
180180

181181
String expect =
182-
"char,varchar,string,false,=01=02=03=04=05,=01=02=03=04=05=06=07=08=09=0A,0.00,1,2,12345,12345,123.456,123456.789,00:00:00.012345,2003-10-20,1970-01-01T08:00,1970-01-01T00:00:00Z,1970-01-01T00:00:00Z";
182+
"char,varchar,string,false,=01=02=03=04=05,=01=02=03=04=05=06=07=08=09=0A,0.00,1,2,12345,12345,123.456,123456.789,00:00:00.012345,2003-10-20,1970-01-01T00:00,1970-01-01T00:00:00Z,1970-01-01T00:00:00Z";
183183
Assert.assertEquals(expect, arrayRecord.toString());
184184
}
185185
}

0 commit comments

Comments
 (0)