Skip to content

Commit

Permalink
fix error checking in tests (#1127)
Browse files Browse the repository at this point in the history
* fix errors out in tests

* show error if unexpected error in TestRuntimeParameters
  • Loading branch information
rekby committed Jun 28, 2023
1 parent 381d253 commit 300ec9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conn_test.go
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}
Expand All @@ -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")
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 300ec9b

Please sign in to comment.