From d0da98a7424073139b7647c3e9c7947810260ec2 Mon Sep 17 00:00:00 2001 From: kenny Date: Tue, 24 Oct 2023 21:04:21 +0800 Subject: [PATCH] fix: fix test --- pkg/decode/pglogical_test.go | 8 ++++---- pkg/decode/pgoutput_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/decode/pglogical_test.go b/pkg/decode/pglogical_test.go index 2021f6a..1aa09d5 100644 --- a/pkg/decode/pglogical_test.go +++ b/pkg/decode/pglogical_test.go @@ -117,7 +117,7 @@ func TestPGLogicalDecoder(t *testing.T) { {Name: "txt", Oid: 25, Value: &pb.Field_Binary{Binary: b(nT(5), pgtype.TextOID)}}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now, pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, }, }, @@ -129,7 +129,7 @@ func TestPGLogicalDecoder(t *testing.T) { {Name: "txt", Oid: 25, Value: nil}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now.Add(time.Second), pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, Old: []*pb.Field{ {Name: "id", Oid: 20, Value: &pb.Field_Binary{Binary: b(1, pgtype.Int8OID)}}, @@ -137,7 +137,7 @@ func TestPGLogicalDecoder(t *testing.T) { {Name: "txt", Oid: 25, Value: &pb.Field_Binary{Binary: b(nT(5), pgtype.TextOID)}}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now, pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, }, }, @@ -148,7 +148,7 @@ func TestPGLogicalDecoder(t *testing.T) { {Name: "uid", Oid: 2950, Value: &pb.Field_Binary{Binary: b([]byte("782b2492-3e7c-431b-9238-c1136ea57190"), pgtype.UUIDOID)}}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now.Add(time.Second), pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, }, }, diff --git a/pkg/decode/pgoutput_test.go b/pkg/decode/pgoutput_test.go index d97cad4..f37c239 100644 --- a/pkg/decode/pgoutput_test.go +++ b/pkg/decode/pgoutput_test.go @@ -116,7 +116,7 @@ func TestPGOutputDecoder(t *testing.T) { {Name: "txt", Oid: 25, Value: &pb.Field_Binary{Binary: b(nT(5), pgtype.TextOID)}}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now, pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, }, }, @@ -128,7 +128,7 @@ func TestPGOutputDecoder(t *testing.T) { {Name: "txt", Oid: 25, Value: nil}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now.Add(time.Second), pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, Old: []*pb.Field{ {Name: "id", Oid: 20, Value: &pb.Field_Binary{Binary: b(1, pgtype.Int8OID)}}, @@ -136,7 +136,7 @@ func TestPGOutputDecoder(t *testing.T) { {Name: "txt", Oid: 25, Value: &pb.Field_Binary{Binary: b(nT(5), pgtype.TextOID)}}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now, pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, }, }, @@ -147,7 +147,7 @@ func TestPGOutputDecoder(t *testing.T) { {Name: "uid", Oid: 2950, Value: &pb.Field_Binary{Binary: b([]byte("782b2492-3e7c-431b-9238-c1136ea57190"), pgtype.UUIDOID)}}, {Name: "js", Oid: 3802, Value: &pb.Field_Binary{Binary: b([]byte(`{"a": {"b": {"c": {"d": null}}}}`), pgtype.JSONBOID)}}, {Name: "ts", Oid: 1184, Value: &pb.Field_Binary{Binary: b(now.Add(time.Second), pgtype.TimestamptzOID)}}, - {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(10), pgtype.ByteaOID)}}, + {Name: "bs", Oid: 17, Value: &pb.Field_Binary{Binary: b(nB(500000), pgtype.ByteaOID)}}, }, }, },