From 490b9b8419d7a7e3d16ec01370a6c77f6692879b Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Wed, 31 May 2023 15:06:43 +0300 Subject: [PATCH 1/2] fix errors out in tests --- conn_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conn_test.go b/conn_test.go index a44c0f0f..ad910223 100644 --- a/conn_test.go +++ b/conn_test.go @@ -318,7 +318,7 @@ func TestStatment(t *testing.T) { if !r1.Next() { if r.Err() != nil { - t.Fatal(r1.Err()) + t.Fatal(r.Err()) } t.Fatal("expected row") } @@ -1290,7 +1290,7 @@ func TestNullAfterNonNull(t *testing.T) { if !r.Next() { if r.Err() != nil { - t.Fatal(err) + t.Fatal(r.Err()) } t.Fatal("expected row") } @@ -1305,7 +1305,7 @@ func TestNullAfterNonNull(t *testing.T) { if !r.Next() { if r.Err() != nil { - t.Fatal(err) + t.Fatal(r.Err()) } t.Fatal("expected row") } From 5bcc157cc9c29395ad3ddb448cbc458ea35e069f Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Wed, 31 May 2023 17:54:28 +0300 Subject: [PATCH 2/2] show error if unexpected error in TestRuntimeParameters --- conn_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn_test.go b/conn_test.go index ad910223..8fb81ac8 100644 --- a/conn_test.go +++ b/conn_test.go @@ -1501,7 +1501,7 @@ func TestRuntimeParameters(t *testing.T) { } value, success := tryGetParameterValue() - if success != test.success && !test.success { + if success != test.success && !success { t.Fatalf("%v: unexpected error: %v", test.conninfo, err) } if success != test.success {