Fix E2E test gaps and add comprehensive E2E + parity test suites
- 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
This commit is contained in:
49
tests/NATS.E2E.Tests/Infrastructure/AccountServerFixture.cs
Normal file
49
tests/NATS.E2E.Tests/Infrastructure/AccountServerFixture.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
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>;
|
||||
Reference in New Issue
Block a user