Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #865 #895

Merged
merged 2 commits into from Nov 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/NUnitTestAdapter/NUnitEngine/NUnitEngineAdapter.cs
Expand Up @@ -122,8 +122,15 @@ public void CloseRunner()
if (Runner.IsTestRunning)
Runner.StopRun(true);

Runner.Unload();
Runner.Dispose();
try
{
Runner.Unload();
Runner.Dispose();
}
catch (NUnitEngineUnloadException ex)
{
logger.Warning($"Engine encountered NUnitEngineUnloadException : {ex.Message}");
}
Runner = null;
}

Expand Down Expand Up @@ -159,7 +166,7 @@ public string GetXmlFilePath(string folder, string defaultFileName, string exten
int i = 1;
while (true)
{
string path = Path.Combine(folder, $"{defaultFileName}.{i++}.{extension}");
string path = Path.Combine(folder, $"{defaultFileName}.{i++}.{extension}");
if (!File.Exists(path))
return path;
}
Expand Down