Skip to content

Commit 19c738d

Browse files
Fix tests failures by resetting Environment cache (#11441)
1 parent 0e35269 commit 19c738d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/WebJobs.Script.Tests/ScriptHostTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
namespace Microsoft.Azure.WebJobs.Script.Tests
3737
{
38-
public class ScriptHostTests : IClassFixture<ScriptHostTests.TestFixture>
38+
public class ScriptHostTests : IClassFixture<ScriptHostTests.TestFixture>, IDisposable
3939
{
4040
private const string ID = "5a709861cab44e68bfed5d2c2fe7fc0c";
4141
private readonly TestFixture _fixture;
@@ -47,6 +47,7 @@ public class ScriptHostTests : IClassFixture<ScriptHostTests.TestFixture>
4747

4848
public ScriptHostTests(TestFixture fixture)
4949
{
50+
EnvironmentExtensions.ClearCache();
5051
Utility.ColdStartDelayMS = 50;
5152
_fixture = fixture;
5253
_settingsManager = ScriptSettingsManager.Instance;
@@ -1775,6 +1776,11 @@ public void Missing_FunctionsWorkerRuntime_LogsWarning(string functionsWorkerRun
17751776
}
17761777
}
17771778

1779+
public void Dispose()
1780+
{
1781+
EnvironmentExtensions.ClearCache();
1782+
}
1783+
17781784
public class AssemblyMock : Assembly
17791785
{
17801786
public override object[] GetCustomAttributes(Type attributeType, bool inherit)

0 commit comments

Comments
 (0)