Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public void HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryComplete
// and then we write again here. We should refactor this code and write only once.
discoveryCompleteEventArgs.DiscoveredExtensions = TestExtensions.CreateMergedDictionary(
discoveryCompleteEventArgs.DiscoveredExtensions,
TestPluginCache.Instance.TestExtensions.GetCachedExtensions());
TestPluginCache.Instance.TestExtensions?.GetCachedExtensions());

if (RequestData.IsTelemetryOptedIn)
{
Expand Down Expand Up @@ -436,7 +436,7 @@ private string UpdateRawMessageWithTelemetryInfo(DiscoveryCompletePayload discov
// would probably mean a performance hit.
discoveryCompletePayload.DiscoveredExtensions = TestExtensions.CreateMergedDictionary(
discoveryCompletePayload.DiscoveredExtensions,
TestPluginCache.Instance.TestExtensions.GetCachedExtensions());
TestPluginCache.Instance.TestExtensions?.GetCachedExtensions());

// Write extensions to telemetry data.
TestExtensions.AddExtensionTelemetry(
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public void HandleTestRunComplete(TestRunCompleteEventArgs runCompleteArgs!!, Te
// and then we write again here. We should refactor this code and write only once.
runCompleteArgs.DiscoveredExtensions = TestExtensions.CreateMergedDictionary(
runCompleteArgs.DiscoveredExtensions,
TestPluginCache.Instance.TestExtensions.GetCachedExtensions());
TestPluginCache.Instance.TestExtensions?.GetCachedExtensions());

if (_requestData.IsTelemetryOptedIn)
{
Expand Down Expand Up @@ -613,7 +613,7 @@ private string UpdateRawMessageWithTelemetryInfo(TestRunCompletePayload testRunC
// would probably mean a performance hit.
testRunCompletePayload.TestRunCompleteArgs.DiscoveredExtensions = TestExtensions.CreateMergedDictionary(
testRunCompletePayload.TestRunCompleteArgs.DiscoveredExtensions,
TestPluginCache.Instance.TestExtensions.GetCachedExtensions());
TestPluginCache.Instance.TestExtensions?.GetCachedExtensions());

// Write extensions to telemetry data.
TestExtensions.AddExtensionTelemetry(
Expand Down