Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Sep 4, 2024
1 parent bfd48f6 commit ab34503
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/debezium/converters/time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package converters

import (
"fmt"
"github.com/artie-labs/transfer/lib/typing"
"math"
"testing"
"time"

"github.com/artie-labs/transfer/lib/debezium"
"github.com/artie-labs/transfer/lib/typing/ext"
"github.com/stretchr/testify/assert"
)
Expand All @@ -26,7 +26,12 @@ func parseUsingTransfer(converter ValueConverter, value int64) (*ext.ExtendedTim
return extTime, nil
}

return debezium.FromDebeziumTypeToTime(converter.ToField("foo").DebeziumType, value)
parsedValue, err := converter.ToField("foo").ParseValue(value)
if err != nil {
return nil, err
}

return typing.AssertType[*ext.ExtendedTime](parsedValue)
}

func TestTimeConverter_Convert(t *testing.T) {
Expand Down

0 comments on commit ab34503

Please sign in to comment.