Skip to content

Commit 6e9e118

Browse files
committed
use IDisposal for test clean up
1 parent aa30f8b commit 6e9e118

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/Azure.Functions.Cli.Tests/ActionsTests/StartHostActionTests.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace Azure.Functions.Cli.Tests.ActionsTests
1818
{
19-
public class StartHostActionTests
19+
public class StartHostActionTests : IDisposable
2020
{
2121
[SkippableFact]
2222
public async Task CheckNonOptionalSettingsThrowsOnMissingAzureWebJobsStorage()
@@ -113,5 +113,10 @@ private IFileSystem GetFakeFileSystem(IEnumerable<(string folder, string functio
113113

114114
return fileSystem;
115115
}
116+
117+
public void Dispose()
118+
{
119+
FileSystemHelpers.Instance = null;
120+
}
116121
}
117122
}

test/Azure.Functions.Cli.Tests/E2E/Helpers/CliTester.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static async Task InternalRun(string workingDir, RunConfiguration[] runC
6969
}
7070
else
7171
{
72-
exitError &= (await exitCodeTask) != 1;
72+
exitError &= exitCodeTask.Result != 1;
7373
}
7474
}
7575
}

0 commit comments

Comments
 (0)