diff --git a/test/Kurrent.Client.Tests.Common/Fixtures/KurrentPermanentFixture.cs b/test/Kurrent.Client.Tests.Common/Fixtures/KurrentPermanentFixture.cs index 8e9f5bf56..c70fa8360 100644 --- a/test/Kurrent.Client.Tests.Common/Fixtures/KurrentPermanentFixture.cs +++ b/test/Kurrent.Client.Tests.Common/Fixtures/KurrentPermanentFixture.cs @@ -1,3 +1,5 @@ +// ReSharper disable InconsistentNaming + using System.Net; using Ductus.FluentDocker.Builders; using Ductus.FluentDocker.Extensions; @@ -71,10 +73,8 @@ protected KurrentPermanentFixture(ConfigureFixture configure) { DefaultDeadline = Options.ClientSettings.DefaultDeadline }; - InterlockedBoolean WarmUpCompleted { get; } = new InterlockedBoolean(); - SemaphoreSlim WarmUpGatekeeper { get; } = new(1, 1); - - static readonly SemaphoreSlim ContainerSemaphore = new(1, 1); + InterlockedBoolean WarmUpCompleted { get; } = new InterlockedBoolean(); + static readonly SemaphoreSlim WarmUpGatekeeper = new(1, 1); public void CaptureTestRun(ITestOutputHelper outputHelper) { var testRunId = Logging.CaptureLogs(outputHelper); @@ -84,19 +84,13 @@ public void CaptureTestRun(ITestOutputHelper outputHelper) { } public async Task InitializeAsync() { - await ContainerSemaphore.WaitAsync(); + await WarmUpGatekeeper.WaitAsync(); + try { await Service.Start(); EventStoreVersion = GetKurrentVersion(); EventStoreHasLastStreamPosition = (EventStoreVersion?.Major ?? int.MaxValue) >= 21; - // EventStoreHasLastStreamPosition = true; - } finally { - ContainerSemaphore.Release(); - } - - await WarmUpGatekeeper.WaitAsync(); - try { if (!WarmUpCompleted.CurrentValue) { Logger.Warning("*** Warmup started ***"); diff --git a/test/Kurrent.Client.Tests.Common/Fixtures/KurrentTemporaryFixture.cs b/test/Kurrent.Client.Tests.Common/Fixtures/KurrentTemporaryFixture.cs index 3be5f5229..4cea1be60 100644 --- a/test/Kurrent.Client.Tests.Common/Fixtures/KurrentTemporaryFixture.cs +++ b/test/Kurrent.Client.Tests.Common/Fixtures/KurrentTemporaryFixture.cs @@ -74,9 +74,8 @@ protected KurrentTemporaryFixture(ConfigureFixture configure) { DefaultDeadline = Options.ClientSettings.DefaultDeadline }; - InterlockedBoolean WarmUpCompleted { get; } = new InterlockedBoolean(); - SemaphoreSlim WarmUpGatekeeper { get; } = new(1, 1); - static readonly SemaphoreSlim ContainerSemaphore = new(1, 1); + InterlockedBoolean WarmUpCompleted { get; } = new InterlockedBoolean(); + static readonly SemaphoreSlim WarmUpGatekeeper = new(1, 1); public void CaptureTestRun(ITestOutputHelper outputHelper) { var testRunId = Logging.CaptureLogs(outputHelper); @@ -86,19 +85,13 @@ public void CaptureTestRun(ITestOutputHelper outputHelper) { } public async Task InitializeAsync() { - await ContainerSemaphore.WaitAsync(); + await WarmUpGatekeeper.WaitAsync(); + try { await Service.Start(); EventStoreVersion = GetKurrentVersion(); EventStoreHasLastStreamPosition = (EventStoreVersion?.Major ?? int.MaxValue) >= 21; - // EventStoreHasLastStreamPosition = true; - } finally { - ContainerSemaphore.Release(); - } - await WarmUpGatekeeper.WaitAsync(); - - try { if (!WarmUpCompleted.CurrentValue) { Logger.Warning("*** Warmup started ***"); diff --git a/test/Kurrent.Client.Tests/Operations/ShutdownNodeAuthenticationTests.cs b/test/Kurrent.Client.Tests/Operations/ShutdownNodeAuthenticationTests.cs index 31d2a0600..f88fa32c8 100644 --- a/test/Kurrent.Client.Tests/Operations/ShutdownNodeAuthenticationTests.cs +++ b/test/Kurrent.Client.Tests/Operations/ShutdownNodeAuthenticationTests.cs @@ -1,6 +1,5 @@ using EventStore.Client; using Kurrent.Client.Tests.TestNode; -using Kurrent.Client.Tests; namespace Kurrent.Client.Tests;