Applies isolated test context per moment-run

This commit is contained in:
benbierens 2023-06-26 11:10:56 +02:00
parent 55998419ee
commit 25a795f0fd
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 11 additions and 7 deletions

View File

@ -3,6 +3,7 @@ using DistTestCore;
using Logging;
using Utils;
using KubernetesWorkflow;
using NUnit.Framework.Internal;
namespace ContinuousTests
{
@ -91,14 +92,17 @@ namespace ContinuousTests
private void RunMoment(int t)
{
try
using (var context = new TestExecutionContext.IsolatedContext())
{
handle.InvokeMoment(t, InitializeTest);
}
catch (Exception ex)
{
Log($" > TestMoment yielded exception: " + ex);
exceptions.Add(ex);
try
{
handle.InvokeMoment(t, InitializeTest);
}
catch (Exception ex)
{
Log($" > TestMoment yielded exception: " + ex);
exceptions.Add(ex);
}
}
DecommissionTest();