From bac09059152f30c8494feb978c19e0fdb07e77b4 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 13 Feb 2021 14:04:56 -0600 Subject: [PATCH] Specify type for CockroachDB --- tx_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tx_test.go b/tx_test.go index 3ca924e9..a6483941 100644 --- a/tx_test.go +++ b/tx_test.go @@ -176,12 +176,12 @@ func TestTxCommitSerializationFailure(t *testing.T) { } defer tx2.Rollback(context.Background()) - _, err = tx1.Exec(context.Background(), `insert into tx_serializable_sums(num) select sum(num) from tx_serializable_sums`) + _, err = tx1.Exec(context.Background(), `insert into tx_serializable_sums(num) select sum(num)::int from tx_serializable_sums`) if err != nil { t.Fatalf("Exec failed: %v", err) } - _, err = tx2.Exec(context.Background(), `insert into tx_serializable_sums(num) select sum(num) from tx_serializable_sums`) + _, err = tx2.Exec(context.Background(), `insert into tx_serializable_sums(num) select sum(num)::int from tx_serializable_sums`) if err != nil { t.Fatalf("Exec failed: %v", err) }