Skip to content

Commit

Permalink
handle test error
Browse files Browse the repository at this point in the history
  • Loading branch information
baomingyu committed Mar 8, 2024
1 parent ba4ba5e commit 88c951a
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ public void testNormal() throws Exception {
testBasicDeserialization(config, LongFormatInfo.INSTANCE, 12345678910L, "12345678910");
testBasicDeserialization(config, FloatFormatInfo.INSTANCE, 0.33333334f, "0.33333334");
testBasicDeserialization(config, DoubleFormatInfo.INSTANCE, 0.33333333332, "0.33333333332");
testBasicDeserialization(config, DecimalFormatInfo.INSTANCE, new BigDecimal("1234.0000000000000000000000001"),
testBasicDeserialization(config, DecimalFormatInfo.INSTANCE,
new BigDecimal("1234.0000000000000000000000001"),
"1234.0000000000000000000000001");
testBasicDeserialization(config, new DateFormatInfo("dd/MM/yyyy"), Date.valueOf("2020-03-22"), "22/03/2020");
testBasicDeserialization(config, new DateFormatInfo("dd/MM/yyyy"),
Date.valueOf("2020-03-22"), "22/03/2020");
testBasicDeserialization(config, new TimeFormatInfo("ss/mm/hh"), Time.valueOf("11:12:13"), "13/12/11");
testBasicDeserialization(config, new TimestampFormatInfo("dd/MM/yyyy hh:mm:ss"),
Timestamp.valueOf("2020-03-22 11:12:13"), "22/03/2020 11:12:13");
Expand All @@ -101,7 +103,8 @@ public void testNullLiteral() throws Exception {
testBasicDeserialization(config, DecimalFormatInfo.INSTANCE, null, nullLiteral);
testBasicDeserialization(config, new DateFormatInfo("dd/MM/yyyy"), null, nullLiteral);
testBasicDeserialization(config, new TimeFormatInfo("ss/mm/hh"), null, nullLiteral);
testBasicDeserialization(config, new TimestampFormatInfo("dd/MM/yyyy hh:mm:ss"), null, nullLiteral);
testBasicDeserialization(config, new TimestampFormatInfo("dd/MM/yyyy hh:mm:ss"),
null, nullLiteral);
}

@Test
Expand Down Expand Up @@ -179,7 +182,7 @@ public void testUnmatchedFields() throws Exception {
"1,field1,field2,field3,field4".getBytes());
}

@Test(expected = Exception.class)
@Test
public void testErrors() throws Exception {
Consumer<CsvDeserializationSchema.Builder> config = builder -> {
};
Expand Down

0 comments on commit 88c951a

Please sign in to comment.