From f17c743c3cda91e72c870f93a79c33567e2969bb Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Tue, 14 Feb 2023 09:03:07 -0600 Subject: [PATCH] Unwatch at end of test https://github.com/jackc/pgx/issues/1505 --- pgconn/internal/ctxwatch/context_watcher_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pgconn/internal/ctxwatch/context_watcher_test.go b/pgconn/internal/ctxwatch/context_watcher_test.go index 39652995..583199c7 100644 --- a/pgconn/internal/ctxwatch/context_watcher_test.go +++ b/pgconn/internal/ctxwatch/context_watcher_test.go @@ -53,6 +53,7 @@ func TestContextWatcherMultipleWatchPanics(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() cw.Watch(ctx) + defer cw.Unwatch() ctx2, cancel2 := context.WithCancel(context.Background()) defer cancel2()