Frontend gaps fill work. Testing fixes work. Auditing in progress.
This commit is contained in:
@@ -14,7 +14,6 @@ using StellaOps.Messaging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StellaOps.Messaging.Transport.Valkey.Tests.Fixtures;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey.Tests;
|
||||
|
||||
@@ -41,17 +40,17 @@ public sealed class AtLeastOnceDeliveryTests : IAsyncLifetime
|
||||
_output = output;
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
public ValueTask InitializeAsync()
|
||||
{
|
||||
_connectionFactory = _fixture.CreateConnectionFactory();
|
||||
_idempotencyStore = new ValkeyIdempotencyStore(
|
||||
_connectionFactory,
|
||||
$"test-consumer-{Guid.NewGuid():N}",
|
||||
null);
|
||||
return Task.CompletedTask;
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_connectionFactory is not null)
|
||||
{
|
||||
@@ -665,3 +664,6 @@ public sealed class AtLeastOnceDeliveryTests : IAsyncLifetime
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public sealed class ValkeyContainerFixture : RouterCollectionFixture, IAsyncDisp
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task InitializeAsync()
|
||||
public override async ValueTask InitializeAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -168,7 +168,7 @@ public sealed class ValkeyContainerFixture : RouterCollectionFixture, IAsyncDisp
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task DisposeAsync()
|
||||
public override async ValueTask DisposeAsync()
|
||||
{
|
||||
await DisposeAsyncCore();
|
||||
}
|
||||
@@ -201,3 +201,6 @@ public sealed class ValkeyIntegrationTestCollection : ICollectionFixture<ValkeyC
|
||||
{
|
||||
public const string Name = "Valkey Integration Tests";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ using StellaOps.Messaging;
|
||||
using StellaOps.Messaging.Abstractions;
|
||||
using StellaOps.Messaging.Transport.Valkey.Tests.Fixtures;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Messaging.Transport.Valkey.Tests;
|
||||
|
||||
@@ -39,13 +38,13 @@ public sealed class ValkeyTransportComplianceTests : IAsyncLifetime
|
||||
_output = output;
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
public ValueTask InitializeAsync()
|
||||
{
|
||||
_connectionFactory = _fixture.CreateConnectionFactory();
|
||||
return Task.CompletedTask;
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_connectionFactory is not null)
|
||||
{
|
||||
@@ -662,7 +661,7 @@ public sealed class ValkeyTransportComplianceTests : IAsyncLifetime
|
||||
queue.QueueName.Should().NotBeNullOrEmpty();
|
||||
|
||||
_output.WriteLine("Provider name test passed");
|
||||
await Task.CompletedTask;
|
||||
await ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -722,3 +721,6 @@ public sealed class ValkeyTransportComplianceTests : IAsyncLifetime
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public sealed class MicroserviceIntegrationFixture : IAsyncLifetime
|
||||
/// </summary>
|
||||
public InMemoryConnectionRegistry ConnectionRegistry => Services.GetRequiredService<InMemoryConnectionRegistry>();
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
var builder = Host.CreateApplicationBuilder();
|
||||
|
||||
@@ -321,7 +321,7 @@ public sealed class MicroserviceIntegrationFixture : IAsyncLifetime
|
||||
return response;
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_host is not null)
|
||||
{
|
||||
@@ -637,3 +637,6 @@ public sealed class RequestBuilder
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@ public sealed class MessageOrderingTests : IAsyncLifetime, IDisposable
|
||||
private InMemoryChannel? _channel;
|
||||
private readonly CancellationTokenSource _cts = new(TimeSpan.FromSeconds(30));
|
||||
|
||||
public Task InitializeAsync()
|
||||
public ValueTask InitializeAsync()
|
||||
{
|
||||
_channel = new InMemoryChannel("ordering-test", bufferSize: 1000);
|
||||
return Task.CompletedTask;
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
public Task DisposeAsync()
|
||||
public ValueTask DisposeAsync()
|
||||
{
|
||||
_channel?.Dispose();
|
||||
return Task.CompletedTask;
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -405,3 +405,6 @@ public sealed class MessageOrderingTests : IAsyncLifetime, IDisposable
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public sealed class RabbitMqContainerFixture : RouterCollectionFixture, IAsyncDi
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task InitializeAsync()
|
||||
public override async ValueTask InitializeAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public sealed class RabbitMqContainerFixture : RouterCollectionFixture, IAsyncDi
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task DisposeAsync()
|
||||
public override async ValueTask DisposeAsync()
|
||||
{
|
||||
await DisposeAsyncCore();
|
||||
}
|
||||
@@ -161,3 +161,6 @@ public sealed class RabbitMqIntegrationTestCollection : ICollectionFixture<Rabbi
|
||||
{
|
||||
public const string Name = "RabbitMQ Integration Tests";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ public sealed class RabbitMqIntegrationTests : IAsyncLifetime
|
||||
_fixture = fixture;
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
public async ValueTask InitializeAsync()
|
||||
{
|
||||
// Server and client will be created per-test as needed
|
||||
await Task.CompletedTask;
|
||||
await ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_client is not null)
|
||||
{
|
||||
@@ -529,3 +529,6 @@ public sealed class RabbitMqIntegrationTests : IAsyncLifetime
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ using StellaOps.Router.Common.Frames;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using StellaOps.Router.Transport.RabbitMq.Tests.Fixtures;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace StellaOps.Router.Transport.RabbitMq.Tests;
|
||||
|
||||
@@ -40,12 +39,12 @@ public sealed class RabbitMqTransportComplianceTests : IAsyncLifetime
|
||||
_output = output;
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
public ValueTask InitializeAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_client is not null)
|
||||
{
|
||||
@@ -632,3 +631,6 @@ public sealed class RabbitMqTransportComplianceTests : IAsyncLifetime
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -29,4 +29,5 @@
|
||||
<Using Include="Xunit" />
|
||||
<Using Include="FluentAssertions" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -82,3 +82,7 @@ public sealed class InMemoryMessagingFixture : IAsyncLifetime
|
||||
public class InMemoryMessagingFixtureCollection : ICollectionFixture<InMemoryMessagingFixture>
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,3 +95,5 @@ public sealed class PostgresQueueFixture : IAsyncLifetime
|
||||
public class PostgresQueueFixtureCollection : ICollectionFixture<PostgresQueueFixture>
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -106,3 +106,5 @@ public sealed class ValkeyFixture : IAsyncLifetime
|
||||
public class ValkeyFixtureCollection : ICollectionFixture<ValkeyFixture>
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<UseXunitV3>true</UseXunitV3>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UseAppHost>true</UseAppHost>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
@@ -22,7 +24,9 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
|
||||
<PackageReference Include="Testcontainers" />
|
||||
<PackageReference Include="Testcontainers.PostgreSql" />
|
||||
<PackageReference Include="xunit.v3.extensibility.core" PrivateAssets="all" />
|
||||
<PackageReference Include="xunit.v3.core" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
@@ -84,12 +84,12 @@ public abstract class RouterTestFixture : IAsyncLifetime
|
||||
/// <summary>
|
||||
/// Override for async initialization.
|
||||
/// </summary>
|
||||
public virtual Task InitializeAsync() => Task.CompletedTask;
|
||||
public virtual ValueTask InitializeAsync() => ValueTask.CompletedTask;
|
||||
|
||||
/// <summary>
|
||||
/// Override for async cleanup.
|
||||
/// </summary>
|
||||
public virtual Task DisposeAsync() => Task.CompletedTask;
|
||||
public virtual ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -97,6 +97,9 @@ public abstract class RouterTestFixture : IAsyncLifetime
|
||||
/// </summary>
|
||||
public abstract class RouterCollectionFixture : IAsyncLifetime
|
||||
{
|
||||
public virtual Task InitializeAsync() => Task.CompletedTask;
|
||||
public virtual Task DisposeAsync() => Task.CompletedTask;
|
||||
public virtual ValueTask InitializeAsync() => ValueTask.CompletedTask;
|
||||
public virtual ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" />
|
||||
<PackageReference Include="xunit" PrivateAssets="all" />
|
||||
<PackageReference Include="xunit.v3.extensibility.core" PrivateAssets="all" />
|
||||
<PackageReference Include="FluentAssertions" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -22,3 +22,4 @@
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user