test(batch57): port 53 SuperCluster and LeafNode integration tests

Ports 36 JetStream super-cluster tests from jetstream_super_cluster_test.go,
3 JetStream leaf-node tests from jetstream_leafnode_test.go, and 14 leaf-node
tests from leafnode_test.go into the integration test project. Creates the
required harness infrastructure (TestSuperCluster, TestCluster, IntegrationTestBase,
CheckHelper, ConfigHelper, NatsTestClient, TestServerHelper). All 53 tests are
marked [Fact(Skip = "...")] pending full multi-server cluster runtime.
This commit is contained in:
Joseph Doherty
2026-03-01 12:15:44 -05:00
parent 41ea272c8a
commit bebff9168a
9 changed files with 1037 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
// Copyright 2020-2025 The NATS Authors
// Licensed under the Apache License, Version 2.0
using NATS.Client.Core;
namespace ZB.MOM.NatsNet.Server.IntegrationTests.Helpers;
/// <summary>
/// Helpers for connecting NATS test clients to running servers.
/// </summary>
public static class NatsTestClient
{
/// <summary>Connects to the given NATS URL.</summary>
public static async Task<NatsConnection> Connect(string url)
{
var conn = new NatsConnection(new NatsOpts { Url = url });
await conn.ConnectAsync();
return conn;
}
/// <summary>Connects to the client URL of the supplied server handle.</summary>
public static Task<NatsConnection> ConnectToServer(object server) =>
throw new NotImplementedException("Requires a running server instance.");
}