From 7a624e5fd5abbe9f64e922ebd2f95994160667e1 Mon Sep 17 00:00:00 2001 From: Aayush Shah Date: Mon, 26 Sep 2022 15:12:31 -0400 Subject: [PATCH] fixup! 1 --- pkg/kv/kvclient/kvcoord/dist_sender_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/kv/kvclient/kvcoord/dist_sender_test.go b/pkg/kv/kvclient/kvcoord/dist_sender_test.go index 360c192c638e..23be2384be61 100644 --- a/pkg/kv/kvclient/kvcoord/dist_sender_test.go +++ b/pkg/kv/kvclient/kvcoord/dist_sender_test.go @@ -1040,14 +1040,15 @@ func TestDistSenderIgnoresNLHEBasedOnOldRangeGeneration(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) tracer := tracing.NewTracer() - ctx, finishAndGetRecording := tracing.ContextWithRecordingSpan( + ctx, getRecording, cancel := tracing.ContextWithRecordingSpan( context.Background(), tracer, "test", ) + defer cancel() stopper := stop.NewStopper() defer stopper.Stop(ctx) clock := hlc.NewClock(hlc.UnixNano, time.Nanosecond) - rpcContext := rpc.NewInsecureTestingContext(ctx, clock, stopper) + rpcContext := rpc.NewInsecureTestingContext(clock, stopper) g := makeGossip(t, stopper, rpcContext) for _, n := range testUserRangeDescriptor3Replicas.Replicas().VoterDescriptors() { require.NoError(t, g.AddInfoProto( @@ -1135,7 +1136,7 @@ func TestDistSenderIgnoresNLHEBasedOnOldRangeGeneration(t *testing.T) { require.Regexp( t, "backing off due to .* stale info", - finishAndGetRecording().String(), + getRecording().String(), ) }