mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
test(coderd/database/awsiamrds): fix unclosed pubsub (#16202)
This commit is contained in:
committed by
GitHub
parent
c0db364f3f
commit
4d9dd0aa94
@ -52,13 +52,14 @@ func TestDriver(t *testing.T) {
|
||||
|
||||
ps, err := pubsub.New(ctx, logger, db, url)
|
||||
require.NoError(t, err)
|
||||
defer ps.Close()
|
||||
|
||||
gotChan := make(chan struct{})
|
||||
subCancel, err := ps.Subscribe("test", func(_ context.Context, _ []byte) {
|
||||
close(gotChan)
|
||||
})
|
||||
defer subCancel()
|
||||
require.NoError(t, err)
|
||||
defer subCancel()
|
||||
|
||||
err = ps.Publish("test", []byte("hello"))
|
||||
require.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user