Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kobeyang committed Aug 16, 2017
1 parent 511f7ea commit 5a9e811
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/outputhost/messagecache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ func (s *MessageCacheSuite) TestTimerQueueCleanupAfterRedelivery() {
}

cMsg.msg.AckId = common.StringPtr(ackIDStr)
s.msgCache.utilHandleDeliveredMsg(cMsg, nil)
s.msgCache.utilHandleDeliveredMsg(cMsg)
ackIDMap[ackIDStr] = struct{}{}
ackID++
}

time.Sleep(time.Second)

s.msgCache.utilHandleRedeliveryTicker(nil)
s.msgCache.utilHandleRedeliveryTicker()
s.Equal(100, len(s.msgRedeliveryCh), "Unexpected message cache redelivery")

for i := 0; i < 100; i++ {
Expand All @@ -134,7 +134,7 @@ func (s *MessageCacheSuite) TestTimerQueueCleanupAfterRedelivery() {
delete(ackIDMap, m.GetAckId())
}

s.msgCache.utilHandleRedeliveryTicker(nil)
s.msgCache.utilHandleRedeliveryTicker()
s.Equal(0, len(s.msgRedeliveryCh), "Unexpected message cache redelivery")
}

Expand Down

0 comments on commit 5a9e811

Please sign in to comment.