Skip to content

Commit 300ec9b

Browse files
authored
fix error checking in tests (#1127)
* fix errors out in tests * show error if unexpected error in TestRuntimeParameters
1 parent 381d253 commit 300ec9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

conn_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func TestStatment(t *testing.T) {
318318

319319
if !r1.Next() {
320320
if r.Err() != nil {
321-
t.Fatal(r1.Err())
321+
t.Fatal(r.Err())
322322
}
323323
t.Fatal("expected row")
324324
}
@@ -1290,7 +1290,7 @@ func TestNullAfterNonNull(t *testing.T) {
12901290

12911291
if !r.Next() {
12921292
if r.Err() != nil {
1293-
t.Fatal(err)
1293+
t.Fatal(r.Err())
12941294
}
12951295
t.Fatal("expected row")
12961296
}
@@ -1305,7 +1305,7 @@ func TestNullAfterNonNull(t *testing.T) {
13051305

13061306
if !r.Next() {
13071307
if r.Err() != nil {
1308-
t.Fatal(err)
1308+
t.Fatal(r.Err())
13091309
}
13101310
t.Fatal("expected row")
13111311
}
@@ -1501,7 +1501,7 @@ func TestRuntimeParameters(t *testing.T) {
15011501
}
15021502

15031503
value, success := tryGetParameterValue()
1504-
if success != test.success && !test.success {
1504+
if success != test.success && !success {
15051505
t.Fatalf("%v: unexpected error: %v", test.conninfo, err)
15061506
}
15071507
if success != test.success {

0 commit comments

Comments
 (0)