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:
Joseph Doherty
2026-03-01 12:18:40 -05:00
parent 854159e9bf
commit e0a87ca41f
4 changed files with 19 additions and 8 deletions

View File

@@ -45,6 +45,19 @@ public abstract class IntegrationTestBase : IDisposable
/// <summary>xUnit output helper, available to derived test classes.</summary>
protected ITestOutputHelper Output { get; }
/// <summary>
/// Returns true if integration tests should be skipped.
/// Convenience method for use in individual test methods that call
/// <c>Skip.If(ShouldSkip(), "reason")</c>.
/// </summary>
protected static bool ShouldSkip() => !Helpers.TestServerHelper.CanBoot();
/// <summary>
/// Returns true if the server runtime is unavailable.
/// Alias for <see cref="ShouldSkip"/> used by some test batches.
/// </summary>
protected static bool ServerRuntimeUnavailable => !Helpers.TestServerHelper.CanBoot();
// =========================================================================
// IDisposable
// =========================================================================