Skip to content

Commit

Permalink
test: trigger errActiveRows
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyang01 committed Dec 23, 2024
1 parent 43c7d13 commit b8a948d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions statement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ func TestPrepareQuery(t *testing.T) {
rows, err = stmt.QueryBound(context.Background())
require.NoError(t, err)
require.NotNil(t, rows)

badRows, err := stmt.QueryBound(context.Background())
require.ErrorIs(t, err, errActiveRows)
require.Nil(t, badRows)

badResults, err := stmt.ExecBound(context.Background())
require.ErrorIs(t, err, errActiveRows)
require.Nil(t, badResults)

require.NoError(t, rows.Close())

require.NoError(t, stmt.Close())
Expand Down

0 comments on commit b8a948d

Please sign in to comment.