Skip to content

Commit 4d9dd0a

Browse files
authored
test(coderd/database/awsiamrds): fix unclosed pubsub (#16202)
1 parent c0db364 commit 4d9dd0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/database/awsiamrds/awsiamrds_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ func TestDriver(t *testing.T) {
5252

5353
ps, err := pubsub.New(ctx, logger, db, url)
5454
require.NoError(t, err)
55+
defer ps.Close()
5556

5657
gotChan := make(chan struct{})
5758
subCancel, err := ps.Subscribe("test", func(_ context.Context, _ []byte) {
5859
close(gotChan)
5960
})
60-
defer subCancel()
6161
require.NoError(t, err)
62+
defer subCancel()
6263

6364
err = ps.Publish("test", []byte("hello"))
6465
require.NoError(t, err)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy