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:
36
tests/NATS.E2E.Tests/Infrastructure/MonitorServerFixture.cs
Normal file
36
tests/NATS.E2E.Tests/Infrastructure/MonitorServerFixture.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using NATS.Client.Core;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace NATS.E2E.Tests.Infrastructure;
|
||||
|
||||
public sealed class MonitorServerFixture : IAsyncLifetime
|
||||
{
|
||||
private NatsServerProcess _server = null!;
|
||||
|
||||
public int Port => _server.Port;
|
||||
|
||||
public int MonitorPort => _server.MonitorPort!.Value;
|
||||
|
||||
public HttpClient MonitorClient { get; private set; } = null!;
|
||||
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
_server = new NatsServerProcess(enableMonitoring: true);
|
||||
await _server.StartAsync();
|
||||
MonitorClient = new HttpClient { BaseAddress = new Uri($"http://127.0.0.1:{MonitorPort}") };
|
||||
}
|
||||
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
MonitorClient?.Dispose();
|
||||
await _server.DisposeAsync();
|
||||
}
|
||||
|
||||
public NatsConnection CreateClient()
|
||||
{
|
||||
return new NatsConnection(new NatsOpts { Url = $"nats://127.0.0.1:{Port}" });
|
||||
}
|
||||
}
|
||||
|
||||
[CollectionDefinition("E2E-Monitor")]
|
||||
public class MonitorCollection : ICollectionFixture<MonitorServerFixture>;
|
||||
Reference in New Issue
Block a user