Fixes cleanup of online codexnodes in Codex test fixture

This commit is contained in:
benbierens 2023-09-28 15:04:21 +02:00
parent 993f2ff813
commit 3e1b361b7b
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 7 additions and 3 deletions

View File

@ -5,13 +5,10 @@ namespace Tests
{ {
public class AutoBootstrapDistTest : CodexDistTest public class AutoBootstrapDistTest : CodexDistTest
{ {
private readonly List<ICodexNode> onlineCodexNodes = new List<ICodexNode>();
[SetUp] [SetUp]
public void SetUpBootstrapNode() public void SetUpBootstrapNode()
{ {
BootstrapNode = AddCodex(s => s.WithName("BOOTSTRAP")); BootstrapNode = AddCodex(s => s.WithName("BOOTSTRAP"));
onlineCodexNodes.Add(BootstrapNode);
} }
[TearDown] [TearDown]

View File

@ -6,6 +6,7 @@ using DistTestCore;
using DistTestCore.Helpers; using DistTestCore.Helpers;
using DistTestCore.Logs; using DistTestCore.Logs;
using GethPlugin; using GethPlugin;
using NUnit.Framework;
using NUnit.Framework.Constraints; using NUnit.Framework.Constraints;
namespace Tests namespace Tests
@ -22,6 +23,12 @@ namespace Tests
ProjectPlugin.Load<MetricsPlugin.MetricsPlugin>(); ProjectPlugin.Load<MetricsPlugin.MetricsPlugin>();
} }
[TearDown]
public void TearDownCodexFixture()
{
onlineCodexNodes.Clear();
}
protected override void Initialize(FixtureLog fixtureLog) protected override void Initialize(FixtureLog fixtureLog)
{ {
var localBuilder = new LocalCodexBuilder(fixtureLog); var localBuilder = new LocalCodexBuilder(fixtureLog);