Try fix test failures (#18620)
This commit is contained in:
@@ -233,9 +233,14 @@ public abstract partial class InteractionTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
[TearDown]
|
[TearDown]
|
||||||
public virtual async Task Cleanup()
|
public async Task TearDownInternal()
|
||||||
{
|
{
|
||||||
await Server.WaitPost(() => MapMan.DeleteMap(MapId));
|
await Server.WaitPost(() => MapMan.DeleteMap(MapId));
|
||||||
await PairTracker.CleanReturnAsync();
|
await PairTracker.CleanReturnAsync();
|
||||||
|
await TearDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual async Task TearDown()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using Robust.UnitTesting;
|
|||||||
namespace Content.IntegrationTests.Tests.Toolshed;
|
namespace Content.IntegrationTests.Tests.Toolshed;
|
||||||
|
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
[FixtureLifeCycle(LifeCycle.SingleInstance)]
|
[FixtureLifeCycle(LifeCycle.InstancePerTestCase)]
|
||||||
public abstract class ToolshedTest : IInvocationContext
|
public abstract class ToolshedTest : IInvocationContext
|
||||||
{
|
{
|
||||||
protected PairTracker PairTracker = default!;
|
protected PairTracker PairTracker = default!;
|
||||||
@@ -27,13 +27,19 @@ public abstract class ToolshedTest : IInvocationContext
|
|||||||
protected IInvocationContext? Context = null;
|
protected IInvocationContext? Context = null;
|
||||||
|
|
||||||
[TearDown]
|
[TearDown]
|
||||||
public virtual async Task TearDown()
|
public async Task TearDownInternal()
|
||||||
|
{
|
||||||
|
await PairTracker.CleanReturnAsync();
|
||||||
|
await TearDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual async Task TearDown()
|
||||||
{
|
{
|
||||||
Assert.IsEmpty(_expectedErrors);
|
Assert.IsEmpty(_expectedErrors);
|
||||||
ClearErrors();
|
ClearErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
[OneTimeSetUp]
|
[SetUp]
|
||||||
public virtual async Task Setup()
|
public virtual async Task Setup()
|
||||||
{
|
{
|
||||||
PairTracker = await PoolManager.GetServerClient(new PoolSettings {NoClient = NoClient});
|
PairTracker = await PoolManager.GetServerClient(new PoolSettings {NoClient = NoClient});
|
||||||
|
|||||||
Reference in New Issue
Block a user