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()
34
34
Activity . DefaultIdFormat = ActivityIdFormat . W3C ;
35
35
}
36
36
37
- [ Fact ( Skip = "Get around GitHub failure" ) ]
37
+ [ Fact ]
38
38
public void TracerProviderSdkInvokesSamplingWithCorrectParameters ( )
39
39
{
40
40
var testSampler = new TestSampler ( ) ;
@@ -101,10 +101,15 @@ public void TracerProviderSdkInvokesSamplingWithCorrectParameters()
101
101
using ( var fromInvalidW3CIdParent =
102
102
activitySource . StartActivity ( "customContext" , ActivityKind . Client , "InvalidW3CIdParent" ) )
103
103
{
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 ) ;
108
113
}
109
114
}
110
115
You can’t perform that action at this time.
0 commit comments