diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs index f3c2a835ca..1ef8c11e0b 100644 --- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs +++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs @@ -233,9 +233,14 @@ public abstract partial class InteractionTest } [TearDown] - public virtual async Task Cleanup() + public async Task TearDownInternal() { await Server.WaitPost(() => MapMan.DeleteMap(MapId)); await PairTracker.CleanReturnAsync(); + await TearDown(); + } + + protected virtual async Task TearDown() + { } } diff --git a/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs b/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs index 54df7b7335..acec048906 100644 --- a/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs +++ b/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs @@ -11,7 +11,7 @@ using Robust.UnitTesting; namespace Content.IntegrationTests.Tests.Toolshed; [TestFixture] -[FixtureLifeCycle(LifeCycle.SingleInstance)] +[FixtureLifeCycle(LifeCycle.InstancePerTestCase)] public abstract class ToolshedTest : IInvocationContext { protected PairTracker PairTracker = default!; @@ -27,13 +27,19 @@ public abstract class ToolshedTest : IInvocationContext protected IInvocationContext? Context = null; [TearDown] - public virtual async Task TearDown() + public async Task TearDownInternal() + { + await PairTracker.CleanReturnAsync(); + await TearDown(); + } + + protected virtual async Task TearDown() { Assert.IsEmpty(_expectedErrors); ClearErrors(); } - [OneTimeSetUp] + [SetUp] public virtual async Task Setup() { PairTracker = await PoolManager.GetServerClient(new PoolSettings {NoClient = NoClient});