From 3ccfb261375474dc4b4ea40ddf8cb3c7829d992b Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Wed, 7 Jul 2021 11:37:42 -0400 Subject: [PATCH] psql: close opened rows in tests (#6669) --- state/indexer/sink/psql/psql_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/state/indexer/sink/psql/psql_test.go b/state/indexer/sink/psql/psql_test.go index 0c3cf81d0..ee1af5a5f 100644 --- a/state/indexer/sink/psql/psql_test.go +++ b/state/indexer/sink/psql/psql_test.go @@ -293,6 +293,7 @@ func verifyBlock(h int64) (bool, error) { if err != nil { return false, err } + defer rows.Close() if !rows.Next() { return false, nil @@ -308,6 +309,7 @@ func verifyBlock(h int64) (bool, error) { if err != nil { return false, err } + defer rows.Close() return rows.Next(), nil }