File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
test/OpenTelemetry.Tests/Trace Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public TracerProviderSdkTest()
3434 Activity . DefaultIdFormat = ActivityIdFormat . W3C ;
3535 }
3636
37- [ Fact ( Skip = "Get around GitHub failure" ) ]
37+ [ Fact ]
3838 public void TracerProviderSdkInvokesSamplingWithCorrectParameters ( )
3939 {
4040 var testSampler = new TestSampler ( ) ;
@@ -101,10 +101,15 @@ public void TracerProviderSdkInvokesSamplingWithCorrectParameters()
101101 using ( var fromInvalidW3CIdParent =
102102 activitySource . StartActivity ( "customContext" , ActivityKind . Client , "InvalidW3CIdParent" ) )
103103 {
104- // OpenTelemetry ActivityContext does not support
105- // non W3C Ids. Starting activity with non W3C Ids
106- // will result in no activity being created.
107- Assert . Null ( fromInvalidW3CIdParent ) ;
104+ // Verify that StartActivity returns an instance of Activity.
105+ Assert . NotNull ( fromInvalidW3CIdParent ) ;
106+
107+ // Verify that the TestSampler was invoked and received the correct params.
108+ Assert . Equal ( fromInvalidW3CIdParent . TraceId , testSampler . LatestSamplingParameters . TraceId ) ;
109+
110+ // OpenTelemetry ActivityContext does not support non W3C Ids.
111+ Assert . Null ( fromInvalidW3CIdParent . ParentId ) ;
112+ Assert . Equal ( default ( ActivitySpanId ) , fromInvalidW3CIdParent . ParentSpanId ) ;
108113 }
109114 }
110115
You can’t perform that action at this time.
0 commit comments