-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More refactor around extended time #978
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,14 +284,14 @@ func TestField_ParseValue(t *testing.T) { | |
field := Field{Type: Int64, DebeziumType: MicroTime} | ||
value, err := field.ParseValue(int64(54720000000)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, "15:12:00.000000", value.(*ext.ExtendedTime).String("")) | ||
assert.Equal(t, "15:12:00.000000", value.(*ext.ExtendedTime).GetTime().Format("15:04:05.000000")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll run into a cyclical dependency import since it's not in the same package :( |
||
} | ||
{ | ||
// Nano time | ||
field := Field{Type: Int64, DebeziumType: NanoTime} | ||
value, err := field.ParseValue(int64(54720000000000)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, "15:12:00.000000000", value.(*ext.ExtendedTime).String("")) | ||
assert.Equal(t, "15:12:00.000000000", value.(*ext.ExtendedTime).GetTime().Format("15:04:05.000000000")) | ||
} | ||
} | ||
{ | ||
|
@@ -302,7 +302,7 @@ func TestField_ParseValue(t *testing.T) { | |
field := Field{Type: Int64, DebeziumType: dbzType} | ||
value, err := field.ParseValue(int64(1_725_058_799_000)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, "2024-08-30T22:59:59.000", value.(*ext.ExtendedTime).String("")) | ||
assert.Equal(t, "2024-08-30T22:59:59.000", value.(*ext.ExtendedTime).GetTime().Format(ext.RFC3339MillisecondNoTZ)) | ||
} | ||
} | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying a layout