Skip to content

Commit

Permalink
Merge pull request linkedin#244 from mihaitodor/fix-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Karrick McDermott authored Apr 5, 2022
2 parents ee3a1f1 + d8b9207 commit 5b68de1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions logical_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}

Expand All @@ -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"))
}

Expand Down Expand Up @@ -96,8 +94,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"))
}

Expand Down

0 comments on commit 5b68de1

Please sign in to comment.