Skip to content

feat: pubsub reports dropped messages #7660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Deal with test goroutines
Signed-off-by: Spike Curtis <spike@coder.com>
  • Loading branch information
spikecurtis committed May 25, 2023
commit bbc8c4af9d9b9738017e27dba066c9bfd062556a
5 changes: 3 additions & 2 deletions coderd/database/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ func TestPubsub_Disconnect(t *testing.T) {
defer pubsub.Close()
event := "test"

errors := make(chan error)
messages := make(chan string)
// buffer responses so that when the test completes, goroutines don't get blocked & leak
errors := make(chan error, database.PubsubBufferSize)
messages := make(chan string, database.PubsubBufferSize)
readOne := func() (m string, e error) {
t.Helper()
select {
Expand Down