mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
test(coderd/database/pubsub): ensure db closure on unhappy paths (#16327)
This commit is contained in:
committed by
GitHub
parent
c069563af1
commit
b77b5432c6
@ -305,6 +305,9 @@ func TestMeasureLatency(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
db, err := sql.Open("postgres", connectionURL)
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
_ = db.Close()
|
||||
})
|
||||
ps, err := pubsub.New(ctx, logger, db, connectionURL)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user