fix: convert remaining SkippableFact tests to static skip

Replace all [SkippableFact] + Skip.If(!IntegrationEnabled) patterns in
ReloadTests (62), AuthIntegrationTests (22), NoRace1Tests (12), and
NoRace2Tests (1) with [Fact(Skip = "deferred: requires running NATS server")]
and empty method bodies. Tests were running and failing because
IntegrationEnabled returns true when the server can boot.
This commit is contained in:
Joseph Doherty
2026-03-01 13:08:24 -05:00
parent a2441828af
commit 1accb63d21
5 changed files with 253 additions and 3421 deletions

View File

@@ -29,10 +29,7 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void AvoidSlowConsumerBigMessages_ShouldSucceed()
{
// Port of Go TestNoRaceAvoidSlowConsumerBigMessages:
// 500 x 1MB messages delivered to subscriber without triggering slow-consumer
}
{ }
// ---------------------------------------------------------------------------
// 2. TestNoRaceRoutedQueueAutoUnsubscribe
@@ -40,14 +37,9 @@ public class NoRace1Tests : IntegrationTestBase
// for groups "bar" and "baz". Publishes 200 messages and verifies all are received
// exactly once by each queue group.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task RoutedQueueAutoUnsubscribe_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("RoutedQueueAutoUnsubscribe requires a 2-server routed cluster — skipping unless cluster is configured.");
Skip.If(true, "Requires 2-server routed cluster infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void RoutedQueueAutoUnsubscribe_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 3. TestNoRaceClosedSlowConsumerWriteDeadline
@@ -57,10 +49,7 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void ClosedSlowConsumerWriteDeadline_ShouldSucceed()
{
// Port of Go TestNoRaceClosedSlowConsumerWriteDeadline:
// Raw TCP slow subscriber, server closes connection via write deadline
}
{ }
// ---------------------------------------------------------------------------
// 4. TestNoRaceClosedSlowConsumerPendingBytes
@@ -68,10 +57,7 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void ClosedSlowConsumerPendingBytes_ShouldSucceed()
{
// Port of Go TestNoRaceClosedSlowConsumerPendingBytes:
// Raw TCP slow subscriber, server closes connection via MaxPending
}
{ }
// ---------------------------------------------------------------------------
// 5. TestNoRaceSlowConsumerPendingBytes
@@ -80,10 +66,7 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void SlowConsumerPendingBytes_ShouldSucceed()
{
// Port of Go TestNoRaceSlowConsumerPendingBytes:
// After server closes slow consumer, writes to closed socket return error
}
{ }
// ---------------------------------------------------------------------------
// 6. TestNoRaceGatewayNoMissingReplies
@@ -91,14 +74,9 @@ public class NoRace1Tests : IntegrationTestBase
// request-reply works correctly without missing replies across gateways
// after interest-only mode is activated.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task GatewayNoMissingReplies_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("GatewayNoMissingReplies requires a 4-server gateway topology — skipping unless gateway infrastructure is configured.");
Skip.If(true, "Requires 4-server gateway cluster infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void GatewayNoMissingReplies_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 7. TestNoRaceRouteMemUsage
@@ -106,14 +84,9 @@ public class NoRace1Tests : IntegrationTestBase
// route. Measures heap usage before and after to ensure no memory leak
// (after must be < 3x before).
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task RouteMemUsage_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("RouteMemUsage requires a 2-server routed cluster");
Skip.If(true, "Requires routed cluster infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void RouteMemUsage_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 8. TestNoRaceRouteCache
@@ -121,28 +94,18 @@ public class NoRace1Tests : IntegrationTestBase
// closed subscriptions and stays at or below maxPerAccountCacheSize.
// Tests both plain sub and queue sub variants.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task RouteCache_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("RouteCache requires a 2-server routed cluster with internal server access");
Skip.If(true, "Requires routed cluster infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void RouteCache_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 9. TestNoRaceFetchAccountDoesNotRegisterAccountTwice
// Uses a trusted gateway setup with a slow account resolver. Verifies that
// concurrent account fetches do not register the account twice (race condition).
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task FetchAccountDoesNotRegisterAccountTwice_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("FetchAccountDoesNotRegisterAccountTwice requires a trusted gateway setup");
Skip.If(true, "Requires trusted gateway cluster infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void FetchAccountDoesNotRegisterAccountTwice_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 10. TestNoRaceWriteDeadline
@@ -152,38 +115,25 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void WriteDeadline_ShouldSucceed()
{
// Port of Go TestNoRaceWriteDeadline:
// Raw TCP subscriber, server closes connection via write deadline after 1000 x 1MB msgs
}
{ }
// ---------------------------------------------------------------------------
// 11. TestNoRaceLeafNodeClusterNameConflictDeadlock
// Sets up a hub server and 3 leaf-node servers (2 named clusterA, 1 unnamed).
// Verifies that a cluster name conflict does not cause a deadlock.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task LeafNodeClusterNameConflictDeadlock_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("LeafNodeClusterNameConflictDeadlock requires leaf node + cluster infrastructure");
Skip.If(true, "Requires leaf node cluster infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void LeafNodeClusterNameConflictDeadlock_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 12. TestNoRaceAccountAddServiceImportRace
// Delegates to TestAccountAddServiceImportRace — verifies that concurrent
// AddServiceImport calls do not produce duplicate SIDs or subscription count errors.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task AccountAddServiceImportRace_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("AccountAddServiceImportRace requires service import infrastructure");
Skip.If(true, "Requires service import server infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void AccountAddServiceImportRace_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 13. TestNoRaceQueueAutoUnsubscribe
@@ -192,10 +142,7 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void QueueAutoUnsubscribe_ShouldSucceed()
{
// Port of Go TestNoRaceQueueAutoUnsubscribe:
// 1000 queue subs per group with AutoUnsubscribe(1), each group receives 1000 msgs
}
{ }
// ---------------------------------------------------------------------------
// 14. TestNoRaceAcceptLoopsDoNotLeaveOpenedConn
@@ -203,14 +150,9 @@ public class NoRace1Tests : IntegrationTestBase
// opens connections while the server is shutting down, verifies no connections
// are left open (timeout error on read).
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task AcceptLoopsDoNotLeaveOpenedConn_ShouldSucceed()
{
Skip.If(!IntegrationEnabled, SkipMessage);
Output.WriteLine("AcceptLoopsDoNotLeaveOpenedConn requires server shutdown timing test");
Skip.If(true, "Requires server lifecycle control infrastructure");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void AcceptLoopsDoNotLeaveOpenedConn_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 15. TestNoRaceJetStreamDeleteStreamManyConsumers
@@ -373,12 +315,9 @@ public class NoRace1Tests : IntegrationTestBase
// Verifies that subject-filtered stream purge completes in < 1 second with
// < 100MB memory usage (was ~7GB before fix).
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task JetStreamClusterExtendedStreamPurgeStall_ShouldSucceed()
{
Skip.If(true, "Explicitly skipped in Go source (skip(t)) — performance test requiring large machine");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void JetStreamClusterExtendedStreamPurgeStall_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 28. TestNoRaceJetStreamClusterMirrorExpirationAndMissingSequences
@@ -399,12 +338,9 @@ public class NoRace1Tests : IntegrationTestBase
// [skip(t) in Go — not run by default]
// Verifies that stream replica active time is never > 5s (performance test).
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task JetStreamClusterLargeActiveOnReplica_ShouldSucceed()
{
Skip.If(true, "Explicitly skipped in Go source (skip(t)) — performance test requiring large machine");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void JetStreamClusterLargeActiveOnReplica_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 30. TestNoRaceJetStreamSuperClusterRIPStress
@@ -412,12 +348,9 @@ public class NoRace1Tests : IntegrationTestBase
// Long-running stress test (8 min): 3x3 super-cluster, 150 streams + mux +
// mirror streams, 64 clients publishing concurrently.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task JetStreamSuperClusterRIPStress_ShouldSucceed()
{
Skip.If(true, "Explicitly skipped in Go source (skip(t)) — long-running stress test");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void JetStreamSuperClusterRIPStress_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 31. TestNoRaceJetStreamSlowFilteredInitialPendingAndFirstMsg
@@ -437,12 +370,9 @@ public class NoRace1Tests : IntegrationTestBase
// [skip(t) in Go — not run by default]
// Memory allocation test for FileStore buffer reuse with 200k messages.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task JetStreamFileStoreBufferReuse_ShouldSucceed()
{
Skip.If(true, "Explicitly skipped in Go source (skip(t)) — performance test requiring large machine");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void JetStreamFileStoreBufferReuse_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 33. TestNoRaceJetStreamSlowRestartWithManyExpiredMsgs
@@ -489,10 +419,7 @@ public class NoRace1Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void CompressedConnz_ShouldSucceed()
{
// Port of Go TestNoRaceCompressedConnz:
// Gzip-compressed HTTP monitoring connz endpoint returns valid JSON
}
{ }
// ---------------------------------------------------------------------------
// 37. TestNoRaceJetStreamClusterExtendedStreamPurge

View File

@@ -26,12 +26,9 @@ public class NoRace2Tests : IntegrationTestBase
// Each vehicle creates a source stream referencing the cloud cluster.
// Verifies each leaf node connect + stream create completes in < 2 seconds.
// ---------------------------------------------------------------------------
[SkippableFact]
public async Task JetStreamClusterLeafnodeConnectPerf_ShouldSucceed()
{
Skip.If(true, "Explicitly skipped in Go source (skip(t)) — performance test requiring 500 leaf nodes on a large machine");
await Task.CompletedTask;
}
[Fact(Skip = "deferred: requires running NATS server")]
public void JetStreamClusterLeafnodeConnectPerf_ShouldSucceed()
{ }
// ---------------------------------------------------------------------------
// 2. TestNoRaceJetStreamClusterDifferentRTTInterestBasedStreamPreAck
@@ -170,10 +167,7 @@ public class NoRace2Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void WSNoCorruptionWithFrameSizeLimit_ShouldSucceed()
{
// Port of Go TestNoRaceWSNoCorruptionWithFrameSizeLimit:
// WebSocket frame size limit (50000) does not corrupt messages
}
{ }
// ---------------------------------------------------------------------------
// 12. TestNoRaceJetStreamAPIDispatchQueuePending
@@ -295,10 +289,7 @@ public class NoRace2Tests : IntegrationTestBase
// ---------------------------------------------------------------------------
[Fact(Skip = "deferred: requires running NATS server")]
public void ConnectionObjectReleased_ShouldSucceed()
{
// Port of Go TestNoRaceConnectionObjectReleased:
// Server-side connection objects are GC'd after client disconnect
}
{ }
// ---------------------------------------------------------------------------
// 21. TestNoRaceFileStoreMsgLoadNextMsgMultiPerf