Skip to content

Commit

Permalink
[fix] fix flaky test TestCloseFlushWithTimer
Browse files Browse the repository at this point in the history
## Motivation
The `MaxTime` setting for AckGroupingTracker is too short at only 10,000 nanoseconds.

This causes the test very flaky.

## Modification
- Change the `MaxTime` to 10 seconds
  • Loading branch information
RobertIndie committed Sep 27, 2024
1 parent 630d5f8 commit 8d67d0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulsar/ack_grouping_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func TestCloseFlushWithoutTimer(t *testing.T) {
func TestCloseFlushWithTimer(t *testing.T) {
var acker mockAcker
tracker := newAckGroupingTracker(
&AckGroupingOptions{MaxSize: 1000, MaxTime: 10 * 1000},
&AckGroupingOptions{MaxSize: 1000, MaxTime: 10 * time.Second},
nil,
func(id MessageID) { acker.ackCumulative(id) },
func(ids []*pb.MessageIdData) { acker.ack(ids) },
Expand Down

0 comments on commit 8d67d0a

Please sign in to comment.