From d8b92070fa06b220fde08b31d9c2ccbfb6d765a7 Mon Sep 17 00:00:00 2001 From: Mihai Todor Date: Sat, 26 Mar 2022 00:10:46 +0000 Subject: [PATCH] Fix a bunch of skipped tests --- logical_type_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/logical_type_test.go b/logical_type_test.go index 7108af0..388a51b 100644 --- a/logical_type_test.go +++ b/logical_type_test.go @@ -43,8 +43,7 @@ func TestLongLogicalTypeFallback(t *testing.T) { func TestTimeStampMillisLogicalTypeEncode(t *testing.T) { schema := `{"type": "long", "logicalType": "timestamp-millis"}` testBinaryDecodeFail(t, schema, []byte(""), "short buffer") - t.Skip("this test is broken") - testBinaryEncodeFail(t, schema, "test", "cannot transform binary timestamp-millis, expected time.Time") + testBinaryEncodeFail(t, schema, "test", "cannot transform to binary timestamp-millis, expected time.Time or Go numeric") testBinaryCodecPass(t, schema, time.Date(2006, 1, 2, 15, 04, 05, 565000000, time.UTC), []byte("\xfa\x82\xac\xba\x91\x42")) } @@ -57,8 +56,7 @@ func TestTimeStampMillisLogicalTypeUnionEncode(t *testing.T) { func TestTimeStampMicrosLogicalTypeEncode(t *testing.T) { schema := `{"type": "long", "logicalType": "timestamp-micros"}` testBinaryDecodeFail(t, schema, []byte(""), "short buffer") - t.Skip("this test is broken") - testBinaryEncodeFail(t, schema, "test", "cannot transform binary timestamp-micros, expected time.Time") + testBinaryEncodeFail(t, schema, "test", "cannot transform to binary timestamp-micros, expected time.Time or Go numeric") testBinaryCodecPass(t, schema, time.Date(2006, 1, 2, 15, 04, 05, 565283000, time.UTC), []byte("\xc6\x8d\xf7\xe7\xaf\xd8\x84\x04")) } @@ -98,8 +96,7 @@ func TestTimeMicrosLogicalTypeUnionEncode(t *testing.T) { func TestDateLogicalTypeEncode(t *testing.T) { schema := `{"type": "int", "logicalType": "date"}` testBinaryDecodeFail(t, schema, []byte(""), "short buffer") - t.Skip("this test is broken") - testBinaryEncodeFail(t, schema, "test", "cannot transform to binary date, expected time.Time, received string") + testBinaryEncodeFail(t, schema, "test", "cannot transform to binary date, expected time.Time or Go numeric, received string") testBinaryCodecPass(t, schema, time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC), []byte("\xbc\xcd\x01")) }