Skip to content

Commit 9191e97

Browse files
[API.Tests] Fix IDE0200 warnings (#7013)
1 parent 4f5d502 commit 9191e97

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/OpenTelemetry.Api.Tests/Trace/TracerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ public void StartSpan_WhenCurrentActivityStoppedOnAnotherThread_DoesNotLeaveNewS
608608
var previousActivity = Activity.Current;
609609
Assert.NotNull(previousActivity);
610610

611-
var thread = new Thread(() => previousActivity.Stop());
611+
var thread = new Thread(previousActivity.Stop);
612612
thread.Start();
613613
thread.Join();
614614

@@ -645,7 +645,7 @@ public void StartSpan_WhenCurrentActivityStoppedOnAnotherThread_RestoresFirstRun
645645
Assert.Same(grandparentActivity, parentActivity.Parent);
646646
Assert.Same(parentActivity, currentActivity.Parent);
647647

648-
var thread = new Thread(() => currentActivity.Stop());
648+
var thread = new Thread(currentActivity.Stop);
649649
thread.Start();
650650
thread.Join();
651651

@@ -713,7 +713,7 @@ public void StartRootSpan_WhenCurrentActivityStoppedOnAnotherThread_DoesNotLeave
713713
var previousActivity = Activity.Current;
714714
Assert.NotNull(previousActivity);
715715

716-
var thread = new Thread(() => previousActivity.Stop());
716+
var thread = new Thread(previousActivity.Stop);
717717
thread.Start();
718718
thread.Join();
719719

0 commit comments

Comments
 (0)