mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
test(coderd/database/pubsub): fix data race in err assignment (#15306)
This commit is contained in:
committed by
GitHub
parent
330acd1270
commit
14565615be
@ -58,7 +58,7 @@ func TestPGPubsub_Metrics(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer unsub0()
|
||||
go func() {
|
||||
err = uut.Publish(event, []byte(data))
|
||||
err := uut.Publish(event, []byte(data))
|
||||
assert.NoError(t, err)
|
||||
}()
|
||||
_ = testutil.RequireRecvCtx(ctx, t, messageChannel)
|
||||
@ -93,7 +93,7 @@ func TestPGPubsub_Metrics(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer unsub1()
|
||||
go func() {
|
||||
err = uut.Publish(event, colossalData)
|
||||
err := uut.Publish(event, colossalData)
|
||||
assert.NoError(t, err)
|
||||
}()
|
||||
// should get 2 messages because we have 2 subs
|
||||
|
Reference in New Issue
Block a user