- Fix pull consumer fetch: send original stream subject in HMSG (not inbox) so NATS client distinguishes data messages from control messages - Fix MaxAge expiry: add background timer in StreamManager for periodic pruning - Fix JetStream wire format: Go-compatible anonymous objects with string enums, proper offset-based pagination for stream/consumer list APIs - Add 42 E2E black-box tests (core messaging, auth, TLS, accounts, JetStream) - Add ~1000 parity tests across all subsystems (gaps closure) - Update gap inventory docs to reflect implementation status
50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using NATS.Client.Core;
|
|
|
|
namespace NATS.E2E.Tests.Infrastructure;
|
|
|
|
public sealed class AccountServerFixture : IAsyncLifetime
|
|
{
|
|
private NatsServerProcess _server = null!;
|
|
|
|
public int Port => _server.Port;
|
|
|
|
public async Task InitializeAsync()
|
|
{
|
|
var config = """
|
|
accounts {
|
|
ACCT_A {
|
|
users = [
|
|
{ user: "user_a", password: "pass_a" }
|
|
]
|
|
}
|
|
ACCT_B {
|
|
users = [
|
|
{ user: "user_b", password: "pass_b" }
|
|
]
|
|
}
|
|
}
|
|
""";
|
|
|
|
_server = NatsServerProcess.WithConfig(config);
|
|
await _server.StartAsync();
|
|
}
|
|
|
|
public async Task DisposeAsync()
|
|
{
|
|
await _server.DisposeAsync();
|
|
}
|
|
|
|
public NatsConnection CreateClientA()
|
|
{
|
|
return new NatsConnection(new NatsOpts { Url = $"nats://user_a:pass_a@127.0.0.1:{Port}" });
|
|
}
|
|
|
|
public NatsConnection CreateClientB()
|
|
{
|
|
return new NatsConnection(new NatsOpts { Url = $"nats://user_b:pass_b@127.0.0.1:{Port}" });
|
|
}
|
|
}
|
|
|
|
[CollectionDefinition("E2E-Accounts")]
|
|
public class AccountsCollection : ICollectionFixture<AccountServerFixture>;
|