Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More OpenTelemetry changes #18246

Merged
merged 16 commits into from
Feb 10, 2025
Next Next commit
trace test run activity
majocha committed Jan 17, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 77dfa51904cbfbfbc4a4e8fba3d65f45fd4f9d08
11 changes: 10 additions & 1 deletion tests/FSharp.Test.Utilities/XunitHelpers.fs
Original file line number Diff line number Diff line change
@@ -168,7 +168,16 @@ type FSharpXunitFramework(sink: IMessageSink) =
cleanUpTemporaryDirectoryOfThisTestRun ()
traceProvider.ForceFlush() |> ignore
traceProvider.Dispose()
base.Dispose()
base.Dispose()

// Group test run under single activity, to make traces more readable.
// Otherwise this overriden method is not necessary and can be removed.
override this.CreateExecutor (assemblyName) =
{ new XunitTestFrameworkExecutor(assemblyName, this.SourceInformationProvider, this.DiagnosticMessageSink) with
override _.RunTestCases(testCases, executionMessageSink, executionOptions) =
use _ = Activity.start $"{assemblyName.Name} {Runtime.InteropServices.RuntimeInformation.FrameworkDescription}" []
base.RunTestCases(testCases, executionMessageSink, executionOptions)
}

override this.CreateDiscoverer (assemblyInfo) =
{ new XunitTestFrameworkDiscoverer(assemblyInfo, this.SourceInformationProvider, this.DiagnosticMessageSink) with