Skip to content

Commit

Permalink
Clean-up MNTR for standalone migration (#5302)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Oct 11, 2021
1 parent dbe76a2 commit 029d007
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 233 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,22 @@ public void Only_MultiNodeConfig_role_count_used()
private static Dictionary<string, List<NodeTest>> DiscoverSpecs()
{
Environment.SetEnvironmentVariable(MultiNodeFactAttribute.MultiNodeTestEnvironmentName, "1");
using (var controller = new XunitFrontController(AppDomainSupport.IfAvailable, new System.Uri(typeof(DiscoveryCases).GetTypeInfo().Assembly.CodeBase).LocalPath))
try
{
using (var discovery = new Discovery())
using (var controller = new XunitFrontController(AppDomainSupport.IfAvailable, new System.Uri(typeof(DiscoveryCases).GetTypeInfo().Assembly.CodeBase).LocalPath))
{
controller.Find(false, discovery, TestFrameworkOptions.ForDiscovery());
discovery.Finished.WaitOne();
return discovery.Tests;
using (var discovery = new Discovery())
{
controller.Find(false, discovery, TestFrameworkOptions.ForDiscovery());
discovery.Finished.WaitOne();
return discovery.Tests;
}
}
}
finally
{
Environment.SetEnvironmentVariable(MultiNodeFactAttribute.MultiNodeTestEnvironmentName, null);
}
}

private string KeyFromSpecName(string specName)
Expand Down
Loading

0 comments on commit 029d007

Please sign in to comment.