Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Mar 27, 2024
1 parent 26c4de6 commit 2e62615
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions integration_tests/mysql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,19 @@ const expectedPayloadTemplate = `{
"parameters": null
},
{
"type": "string",
"type": "int64",
"optional": false,
"default": null,
"field": "c_datetime",
"name": "io.debezium.time.ZonedTimestamp",
"name": "io.debezium.time.MicroTimestamp",
"parameters": null
},
{
"type": "int64",
"type": "string",
"optional": false,
"default": null,
"field": "c_timestamp",
"name": "io.debezium.time.MicroTimestamp",
"name": "io.debezium.time.ZonedTimestamp",
"parameters": null
},
{
Expand Down Expand Up @@ -409,7 +409,7 @@ const expectedPayloadTemplate = `{
"c_char": "X",
"c_date": 18263,
"c_date_0000_00_00": null,
"c_datetime": "2001-02-03T04:05:06Z",
"c_datetime": 981173106000000,
"c_decimal": "EtRQ",
"c_double": 45.678,
"c_enum": "medium",
Expand All @@ -422,7 +422,7 @@ const expectedPayloadTemplate = `{
"c_smallint": 2,
"c_text": "ZXCV",
"c_time": 14706000000,
"c_timestamp": 981173106000000,
"c_timestamp": "2001-02-03T04:05:06Z",
"c_tinyint": 1,
"c_varbinary": "Qk5N",
"c_varchar": "GHJKL",
Expand Down
2 changes: 1 addition & 1 deletion lib/postgres/scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestScanAdapter_ParsePrimaryKeyValue(t *testing.T) {
name: "unsupported data type",
dataType: schema.Array,
value: "1234",
expectedErr: "DataType(20) for column 'col' is not supported for use as a primary key",
expectedErr: "DataType(21) for column 'col' is not supported for use as a primary key",
},
{
name: "boolean - malformed",
Expand Down
4 changes: 2 additions & 2 deletions sources/mysql/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func valueConverterForType(d schema.DataType, opts *schema.Opts) (converters.Val
case schema.Date:
return converters.DateConverter{}, nil
case schema.DateTime:
return converters.ZonedTimestampConverter{}, nil
case schema.Timestamp:
return converters.MicroTimestampConverter{}, nil
case schema.Timestamp:
return converters.ZonedTimestampConverter{}, nil
case schema.Year:
return converters.YearConverter{}, nil
case schema.Enum:
Expand Down
6 changes: 3 additions & 3 deletions sources/mysql/adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ func TestValueConverterForType(t *testing.T) {
name: "datetime",
dataType: schema.DateTime,
expected: debezium.Field{
Type: "string",
DebeziumType: "io.debezium.time.Timestamp",
Type: "int64",
DebeziumType: "io.debezium.time.MicroTimestamp",
FieldName: colName,
},
},
Expand All @@ -228,7 +228,7 @@ func TestValueConverterForType(t *testing.T) {
dataType: schema.Timestamp,
expected: debezium.Field{
Type: "string",
DebeziumType: "io.debezium.time.Timestamp",
DebeziumType: "io.debezium.time.ZonedTimestamp",
FieldName: colName,
},
},
Expand Down

0 comments on commit 2e62615

Please sign in to comment.