// Copyright 2020-2025 The NATS Authors // Licensed under the Apache License, Version 2.0 namespace ZB.MOM.NatsNet.Server.IntegrationTests.Helpers; /// /// Placeholder harness for a JetStream super-cluster (multiple clusters connected /// by gateways). The real implementation requires the full NatsServer runtime to /// be capable of spawning in-process cluster nodes. /// public sealed class TestSuperCluster : IDisposable { private readonly List _clusters; private TestSuperCluster(List clusters) { _clusters = clusters; } /// /// Creates a super-cluster with clusters, each /// containing servers. /// Not yet implemented — tests that call this will be skipped. /// public static TestSuperCluster CreateJetStreamSuperCluster(int numPerCluster, int numClusters) => new([]); /// Returns the current JetStream meta-leader across all clusters. public object? Leader() => null; /// Returns a random server from any cluster in the super-cluster. public object? RandomServer() => null; /// Waits until a meta-leader is elected. public void WaitOnLeader() { /* placeholder */ } /// Waits until a stream leader is elected in the given account. public void WaitOnStreamLeader(string account, string stream) { /* placeholder */ } /// Returns the named cluster. public TestCluster ClusterForName(string name) => _clusters.Single(c => c.Name == name); public void Dispose() { foreach (var c in _clusters) c.Dispose(); } }