Skip to content

Commit 8b87e7c

Browse files
authored
Merge pull request #235 from toga4/fix-emulator-timestamp-nanoseconds-test
Fix expected timestamp values in integration test
2 parents 51b270f + e5a0d42 commit 8b87e7c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

integration_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ func TestSubscriber_DataChangeRecord(t *testing.T) {
553553
// INT64 -> string (e.g. "1")
554554
// FLOAT32/FLOAT64 -> float64 (e.g. 0.25)
555555
// BOOL -> bool (e.g. true)
556-
// TIMESTAMP -> string (RFC3339; emulator truncates nanoseconds)
556+
// TIMESTAMP -> string (RFC3339)
557557
// DATE -> string (e.g. "2023-01-01")
558558
// STRING -> string (e.g. "string")
559559
// BYTES -> string (base64, e.g. "Ynl0ZXM=")
@@ -591,14 +591,14 @@ func TestSubscriber_DataChangeRecord(t *testing.T) {
591591
Keys: map[string]any{"Int64": "1"},
592592
NewValues: map[string]any{
593593
"Bool": true, "Float32": 0.25, "Float64": 0.5,
594-
"Timestamp": "2023-12-31T23:59:59Z", "Date": "2023-01-01",
594+
"Timestamp": "2023-12-31T23:59:59.999999999Z", "Date": "2023-01-01",
595595
"String": "string", "Bytes": "Ynl0ZXM=",
596596
"Numeric": "123.456", "Json": `{"name":"foobar"}`,
597597
"BoolArray": []any{true, false},
598598
"Int64Array": []any{"1", "2"},
599599
"Float32Array": []any{0.25, 0.75},
600600
"Float64Array": []any{0.5, 0.25},
601-
"TimestampArray": []any{"2023-12-31T23:59:59Z", "2023-01-01T00:00:00Z"},
601+
"TimestampArray": []any{"2023-12-31T23:59:59.999999999Z", "2023-01-01T00:00:00Z"},
602602
"DateArray": []any{"2023-01-01", "2023-02-01"},
603603
"StringArray": []any{"string1", "string2"},
604604
"BytesArray": []any{"Ynl0ZXMx", "Ynl0ZXMy"},
@@ -641,14 +641,14 @@ func TestSubscriber_DataChangeRecord(t *testing.T) {
641641
Keys: map[string]any{"Int64": "1"},
642642
NewValues: map[string]any{
643643
"Bool": false, "Float32": 0.25, "Float64": 0.5,
644-
"Timestamp": "2023-12-31T23:59:59Z", "Date": "2023-01-01",
644+
"Timestamp": "2023-12-31T23:59:59.999999999Z", "Date": "2023-01-01",
645645
"String": "string", "Bytes": "Ynl0ZXM=",
646646
"Numeric": "123.456", "Json": `{"name":"foobar"}`,
647647
"BoolArray": []any{true, false},
648648
"Int64Array": []any{"1", "2"},
649649
"Float32Array": []any{0.25, 0.75},
650650
"Float64Array": []any{0.5, 0.25},
651-
"TimestampArray": []any{"2023-12-31T23:59:59Z", "2023-01-01T00:00:00Z"},
651+
"TimestampArray": []any{"2023-12-31T23:59:59.999999999Z", "2023-01-01T00:00:00Z"},
652652
"DateArray": []any{"2023-01-01", "2023-02-01"},
653653
"StringArray": []any{"string1", "string2"},
654654
"BytesArray": []any{"Ynl0ZXMx", "Ynl0ZXMy"},
@@ -657,14 +657,14 @@ func TestSubscriber_DataChangeRecord(t *testing.T) {
657657
},
658658
OldValues: map[string]any{
659659
"Bool": true, "Float32": 0.25, "Float64": 0.5,
660-
"Timestamp": "2023-12-31T23:59:59Z", "Date": "2023-01-01",
660+
"Timestamp": "2023-12-31T23:59:59.999999999Z", "Date": "2023-01-01",
661661
"String": "string", "Bytes": "Ynl0ZXM=",
662662
"Numeric": "123.456", "Json": `{"name":"foobar"}`,
663663
"BoolArray": []any{true, false},
664664
"Int64Array": []any{"1", "2"},
665665
"Float32Array": []any{0.25, 0.75},
666666
"Float64Array": []any{0.5, 0.25},
667-
"TimestampArray": []any{"2023-12-31T23:59:59Z", "2023-01-01T00:00:00Z"},
667+
"TimestampArray": []any{"2023-12-31T23:59:59.999999999Z", "2023-01-01T00:00:00Z"},
668668
"DateArray": []any{"2023-01-01", "2023-02-01"},
669669
"StringArray": []any{"string1", "string2"},
670670
"BytesArray": []any{"Ynl0ZXMx", "Ynl0ZXMy"},
@@ -707,14 +707,14 @@ func TestSubscriber_DataChangeRecord(t *testing.T) {
707707
NewValues: map[string]any{},
708708
OldValues: map[string]any{
709709
"Bool": false, "Float32": 0.25, "Float64": 0.5,
710-
"Timestamp": "2023-12-31T23:59:59Z", "Date": "2023-01-01",
710+
"Timestamp": "2023-12-31T23:59:59.999999999Z", "Date": "2023-01-01",
711711
"String": "string", "Bytes": "Ynl0ZXM=",
712712
"Numeric": "123.456", "Json": `{"name":"foobar"}`,
713713
"BoolArray": []any{true, false},
714714
"Int64Array": []any{"1", "2"},
715715
"Float32Array": []any{0.25, 0.75},
716716
"Float64Array": []any{0.5, 0.25},
717-
"TimestampArray": []any{"2023-12-31T23:59:59Z", "2023-01-01T00:00:00Z"},
717+
"TimestampArray": []any{"2023-12-31T23:59:59.999999999Z", "2023-01-01T00:00:00Z"},
718718
"DateArray": []any{"2023-01-01", "2023-02-01"},
719719
"StringArray": []any{"string1", "string2"},
720720
"BytesArray": []any{"Ynl0ZXMx", "Ynl0ZXMy"},

0 commit comments

Comments
 (0)