Skip to content

Commit 4b0e59e

Browse files
committed
Remove logging
1 parent bbadeee commit 4b0e59e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

integration_test.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,24 +2271,23 @@ func TestAckShouldNotCloseChannel_GH296(t *testing.T) {
22712271
t.Fatalf("Consume error: %v", err)
22722272
}
22732273

2274-
signal := make(chan bool)
2274+
signal := make(chan int)
22752275
acks := make(chan *Delivery, messageCount)
22762276

22772277
go func() {
22782278
counter := 0
22792279
for ;; {
22802280
select {
22812281
case msg := <-msgs:
2282-
t.Logf("starting worker for message: %d", msg.DeliveryTag)
2283-
go worker(t, acks, &msg)
2282+
go worker(acks, &msg)
22842283
case ack := <-acks:
22852284
ackError := ack.Ack(false)
22862285
if ackError != nil {
22872286
t.Logf("Ack error: %v", ackError)
22882287
}
22892288
counter = counter + 1
22902289
if counter >= messageCount {
2291-
signal <- true
2290+
signal <- counter
22922291
return
22932292
}
22942293
case <-time.After(500 * time.Millisecond):
@@ -2302,18 +2301,16 @@ func TestAckShouldNotCloseChannel_GH296(t *testing.T) {
23022301
t.Logf("saw connection closure error: %v", connError)
23032302
case channelError := <-notifyChannelClosed:
23042303
t.Logf("saw channel closure error: %v", channelError)
2305-
case <-signal:
2306-
t.Logf("saw %d messages", messageCount)
2304+
case count := <-signal:
2305+
t.Logf("saw %d messages", count)
23072306
case <-time.After(5 * time.Second):
23082307
t.Fatalf("timed out waiting to see %d messages", messageCount)
23092308
}
23102309
}
23112310

2312-
func worker(t *testing.T, acks chan<- *Delivery, msg *Delivery) {
2313-
t.Logf("worker processing message: %d", msg.DeliveryTag)
2311+
func worker(acks chan<- *Delivery, msg *Delivery) {
23142312
time.Sleep(time.Millisecond * time.Duration(msg.DeliveryTag) * 100)
23152313
acks <- msg
2316-
t.Logf("worker done processing message: %d", msg.DeliveryTag)
23172314
}
23182315

23192316
/*

0 commit comments

Comments
 (0)