@@ -145,8 +145,8 @@ func TestStreamReaderImpl_OnPartitionCloseHandle(t *testing.T) {
145145 readMessagesCtx , readMessagesCtxCancel := xcontext .WithErrCancel (context .Background ())
146146 committedOffset := int64 (222 )
147147
148- e .reader .cfg .Tracer .OnReaderPartitionReadStop = func (info trace.OnReaderStreamPartitionReadStopInfo ) {
149- expected := trace.OnReaderStreamPartitionReadStopInfo {
148+ e .reader .cfg .Tracer .OnReaderPartitionReadStopResponse = func (info trace.TopicReaderPartitionReadStopResponseStartInfo ) func ( doneInfo trace. TopicReaderPartitionReadStopResponseDoneInfo ) {
149+ expected := trace.TopicReaderPartitionReadStopResponseStartInfo {
150150 ReaderConnectionID : e .reader .readConnectionID ,
151151 PartitionContext : e .partitionSession .ctx ,
152152 Topic : e .partitionSession .Topic ,
@@ -160,6 +160,7 @@ func TestStreamReaderImpl_OnPartitionCloseHandle(t *testing.T) {
160160 require .NoError (t , info .PartitionContext .Err ())
161161
162162 readMessagesCtxCancel (errors .New ("test tracer finished" ))
163+ return nil
163164 }
164165
165166 e .Start ()
@@ -184,8 +185,8 @@ func TestStreamReaderImpl_OnPartitionCloseHandle(t *testing.T) {
184185 readMessagesCtx , readMessagesCtxCancel := xcontext .WithErrCancel (context .Background ())
185186 committedOffset := int64 (222 )
186187
187- e .reader .cfg .Tracer .OnReaderPartitionReadStop = func (info trace.OnReaderStreamPartitionReadStopInfo ) {
188- expected := trace.OnReaderStreamPartitionReadStopInfo {
188+ e .reader .cfg .Tracer .OnReaderPartitionReadStopResponse = func (info trace.TopicReaderPartitionReadStopResponseStartInfo ) func ( doneInfo trace. TopicReaderPartitionReadStopResponseDoneInfo ) { //nolint:lll
189+ expected := trace.TopicReaderPartitionReadStopResponseStartInfo {
189190 ReaderConnectionID : e .reader .readConnectionID ,
190191 PartitionContext : e .partitionSession .ctx ,
191192 Topic : e .partitionSession .Topic ,
@@ -198,6 +199,7 @@ func TestStreamReaderImpl_OnPartitionCloseHandle(t *testing.T) {
198199 require .Error (t , info .PartitionContext .Err ())
199200
200201 readMessagesCtxCancel (errors .New ("test tracer finished" ))
202+ return nil
201203 }
202204
203205 e .Start ()
0 commit comments