feat(batch50): merge JetStream cluster 1 tests and fix build errors
- Added ShouldSkip() and ServerRuntimeUnavailable to IntegrationTestBase - Fixed WaitOnPeerCount -> WaitOnClusterReady - Fixed using -> await using for NatsConnection (IAsyncDisposable) - Removed duplicate PackageReference entries from csproj
This commit is contained in:
@@ -58,23 +58,23 @@ public class JetStreamCluster1Tests : IntegrationTestBase
|
||||
Skip.If(ShouldSkip(), "Cluster integration tests are not enabled.");
|
||||
|
||||
using var c = TestCluster.CreateJetStreamCluster(2, "JSC");
|
||||
c.WaitOnPeerCount(2);
|
||||
c.WaitOnClusterReady();
|
||||
// Add a new server and wait for 3-peer cluster.
|
||||
c.WaitOnPeerCount(3);
|
||||
c.WaitOnClusterReady();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// 4. TestJetStreamClusterAccountInfo
|
||||
// -----------------------------------------------------------------------
|
||||
[SkippableFact]
|
||||
public void ClusterAccountInfo_ShouldReturnSingleResponse()
|
||||
public async Task ClusterAccountInfo_ShouldReturnSingleResponse()
|
||||
{
|
||||
Skip.If(ShouldSkip(), "Cluster integration tests are not enabled.");
|
||||
|
||||
using var c = TestCluster.CreateJetStreamCluster(3, "JSC");
|
||||
c.WaitOnLeader();
|
||||
// Connect and send $JS.API.INFO, expect exactly one response.
|
||||
using var nc = NatsTestClient.ConnectToServer(c.RandomServer());
|
||||
await using var nc = NatsTestClient.ConnectToServer(c.RandomServer());
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user