Skip to content
Merged
Changes from all commits
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
12 changes: 3 additions & 9 deletions pkg/queue/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,10 @@ func testEmptyPullAfterSignal(t *testing.T, consumerName string, startConsumer f
<-consumerStarted
synctest.Wait()

Comment thread
mtodor marked this conversation as resolved.
q.Push(99)
pulled := q.Pull()
assert.Equal(t, 99, pulled)

// Simulate waking after another consumer has already taken the item.
// Using Push followed by Pull would race with the waiting consumer.
q.notEmptySignal.Signal()
synctest.Wait()
select {
case <-itemReceived:
t.Fatalf("%s should not have received the pulled item", consumerName)
default:
}

q.Push(42)
synctest.Wait()
Expand Down
Loading