2929import org .apache .commons .lang3 .reflect .FieldUtils ;
3030import org .apache .pulsar .client .api .PulsarClientException ;
3131import org .apache .pulsar .client .api .Schema ;
32- import org .apache .pulsar .client .impl .metrics .LatencyHistogram ;
32+ import org .apache .pulsar .client .impl .metrics .ProducerMetrics ;
3333import org .apache .pulsar .common .api .proto .MessageMetadata ;
3434import org .apache .pulsar .common .protocol .ByteBufPair ;
3535import org .mockito .Mockito ;
@@ -46,7 +46,7 @@ public void testChunkedMessageCtxDeallocate() {
4646 for (int i = 0 ; i < totalChunks ; i ++) {
4747 ProducerImpl .OpSendMsg opSendMsg =
4848 ProducerImpl .OpSendMsg .create (
49- LatencyHistogram . NOOP ,
49+ ( ProducerMetrics ) null ,
5050 MessageImpl .create (new MessageMetadata (), ByteBuffer .allocate (0 ), Schema .STRING , null ),
5151 null , 0 , null );
5252 opSendMsg .chunkedMessageCtx = ctx ;
@@ -100,7 +100,7 @@ public void testFailPendingMessagesSyncRetry()
100100 MessageImpl <?> msg = Mockito .mock (MessageImpl .class );
101101 Mockito .when (msg .getUncompressedSize ()).thenReturn (10 );
102102 ProducerImpl .OpSendMsg op = ProducerImpl .OpSendMsg .create (
103- Mockito . mock ( LatencyHistogram . class ) ,
103+ ( ProducerMetrics ) null ,
104104 msg ,
105105 Mockito .mock (ByteBufPair .class ),
106106 1L ,
@@ -118,7 +118,7 @@ public void testFailPendingMessagesSyncRetry()
118118 Mockito .doAnswer (invocation -> {
119119 // Reentrant retry during callback
120120 ProducerImpl .OpSendMsg retryOp = ProducerImpl .OpSendMsg .create (
121- Mockito . mock ( LatencyHistogram . class ) ,
121+ ( ProducerMetrics ) null ,
122122 retryMsg ,
123123 Mockito .mock (ByteBufPair .class ),
124124 2L ,
0 commit comments