diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/SmokeTests/SandboxLegacySecurityPolicySmokeTest.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/SmokeTests/SandboxLegacySecurityPolicySmokeTest.cs index 6d06d3f9924c..c430168f8aa9 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/SmokeTests/SandboxLegacySecurityPolicySmokeTest.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/SmokeTests/SandboxLegacySecurityPolicySmokeTest.cs @@ -4,7 +4,9 @@ // #if NETFRAMEWORK +using System.IO; using System.Threading.Tasks; +using Datadog.Trace.Configuration; using Xunit; using Xunit.Abstractions; @@ -20,6 +22,9 @@ public class SandboxLegacySecurityPolicySmokeTest : SmokeTestBase public SandboxLegacySecurityPolicySmokeTest(ITestOutputHelper output) : base(output, "Sandbox.LegacySecurityPolicy") { + // This test expects instrumentation to fail gracefully, which writes an error log. + // Keep that expected error out of the directory scanned by CheckBuildLogsForErrors. + SetEnvironmentVariable(ConfigurationKeys.LogDirectory, Path.GetTempPath()); } [SkippableFact]