Skip to content

Commit 18edd91

Browse files
Port fix to always disable telemetry to main (#373)
1 parent 2f0c854 commit 18edd91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Integration/IntegrationTestBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Microsoft.Azure.WebJobs.Extensions.Sql.Samples.Common;
1818
using Microsoft.AspNetCore.WebUtilities;
1919
using System.Collections.Generic;
20+
using static Microsoft.Azure.WebJobs.Extensions.Sql.Telemetry.Telemetry;
2021

2122
namespace Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration
2223
{
@@ -194,6 +195,10 @@ protected void StartFunctionHost(string functionName, SupportedLanguages languag
194195
RedirectStandardError = true,
195196
UseShellExecute = false
196197
};
198+
199+
// Always disable telemetry during test runs
200+
startInfo.EnvironmentVariables[TelemetryOptoutEnvVar] = "1";
201+
197202
this.LogOutput($"Starting {startInfo.FileName} {startInfo.Arguments} in {startInfo.WorkingDirectory}");
198203
this.FunctionHost = new Process
199204
{

0 commit comments

Comments
 (0)