diff --git a/src/Agent.Worker/TestResults/Legacy/LegacyTestRunDataPublisher.cs b/src/Agent.Worker/TestResults/Legacy/LegacyTestRunDataPublisher.cs index 6ed9b9f017..63f17d87f0 100644 --- a/src/Agent.Worker/TestResults/Legacy/LegacyTestRunDataPublisher.cs +++ b/src/Agent.Worker/TestResults/Legacy/LegacyTestRunDataPublisher.cs @@ -49,6 +49,7 @@ public void InitializePublisher(IExecutionContext context, string projectName, V _resultReader = GetTestResultReader(_testRunner, publishRunLevelAttachments); _testRunPublisher = HostContext.GetService(); _featureFlagService = HostContext.GetService(); + _featureFlagService.InitializeFeatureService(_executionContext, connection); _testRunPublisher.InitializePublisher(_executionContext, connection, projectName, _resultReader); _testResultsServer = HostContext.GetService(); _testResultsServer.InitializeServer(connection, _executionContext); diff --git a/src/Agent.Worker/TestResults/TestDataPublisher.cs b/src/Agent.Worker/TestResults/TestDataPublisher.cs index 05778fb743..af99350378 100644 --- a/src/Agent.Worker/TestResults/TestDataPublisher.cs +++ b/src/Agent.Worker/TestResults/TestDataPublisher.cs @@ -57,6 +57,7 @@ public void InitializePublisher(IExecutionContext context, string projectName, V _testResultsServer.InitializeServer(connection, _executionContext); var extensionManager = HostContext.GetService(); _featureFlagService = HostContext.GetService(); + _featureFlagService.InitializeFeatureService(_executionContext, connection); _parser = (extensionManager.GetExtensions()).FirstOrDefault(x => _testRunner.Equals(x.Name, StringComparison.OrdinalIgnoreCase)); _testRunPublisherHelper = new TestRunDataPublisherHelper(_executionContext, _testRunPublisher, null, _testResultsServer); Trace.Leaving();