Skip to content

Commit

Permalink
Fix to increase timeout milliseconds since it's too tight rabbitmq#192
Browse files Browse the repository at this point in the history
  • Loading branch information
t2y committed Jun 20, 2023
1 parent 13dde10 commit a6ccf40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,14 +846,14 @@ func TestIntegrationConsumeCancelWithContext(t *testing.T) {
assertConsumeBody(t, messages, []byte("1"))

cancel()
<-time.After(100 * time.Millisecond) // wait to call cancel asynchronously
<-time.After(200 * time.Millisecond) // wait to call cancel asynchronously

if e := ch.Publish("", queue, false, false, Publishing{Body: []byte("2")}); e != nil {
t.Fatalf("error publishing: %v", e)
}

select {
case <-time.After(100 * time.Millisecond):
case <-time.After(200 * time.Millisecond):
t.Fatalf("Timeout on Close")
case _, ok := <-messages:
if ok {
Expand Down

0 comments on commit a6ccf40

Please sign in to comment.