Skip to content

Commit 0f7c9bc

Browse files
committed
Fix TestKeyBasedBatcherOrdering
1 parent c091c99 commit 0f7c9bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pulsar/internal/key_based_batch_builder_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/apache/pulsar-client-go/pulsar/internal/compression"
2626
pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
2727
"github.com/apache/pulsar-client-go/pulsar/log"
28+
"github.com/prometheus/client_golang/prometheus"
2829
"github.com/sirupsen/logrus"
2930
"github.com/stretchr/testify/assert"
3031
"google.golang.org/protobuf/proto"
@@ -38,6 +39,7 @@ func (m *mockEncryptor) Encrypt(_ []byte, _ *pb.MessageMetadata) ([]byte, error)
3839
}
3940

4041
func TestKeyBasedBatcherOrdering(t *testing.T) {
42+
metrics := NewMetricsProvider(3, map[string]string{}, prometheus.DefaultRegisterer)
4143
keyBatcher, err := NewKeyBasedBatchBuilder(
4244
1000,
4345
1000,
@@ -46,7 +48,7 @@ func TestKeyBasedBatcherOrdering(t *testing.T) {
4648
1,
4749
pb.CompressionType_NONE,
4850
compression.Level(0),
49-
&bufferPoolImpl{},
51+
NewBufferPool(metrics.SendingBuffersCount),
5052
log.NewLoggerWithLogrus(logrus.StandardLogger()),
5153
&mockEncryptor{},
5254
)

0 commit comments

Comments
 (0)