// Copyright 2012-2025 The NATS Authors
// Licensed under the Apache License, Version 2.0
//
// Ported from golang/nats-server/server/jetstream_cluster_3_test.go
// These tests require a running NATS server with JetStream enabled on localhost:4222.

namespace ZB.MOM.NatsNet.Server.IntegrationTests.JetStream;

/// <summary>
/// Integration tests porting the advanced JetStream cluster scenario tests from
/// golang/nats-server/server/jetstream_cluster_3_test.go.
/// These tests require a running NATS server with JetStream enabled on localhost:4222.
/// Start with: cd golang/nats-server &amp;&amp; go run . -p 4222 -js
/// </summary>
[Collection("NatsIntegration")]
[Trait("Category", "Integration")]
public sealed class JetStreamCluster3Tests
{
    [Fact(Skip = "deferred: requires running NATS server")]
    public void RemovePeerByID_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DiscardNewAndMaxMsgsPerSubject_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void CreateConsumerWithReplicaOneGetsResponse_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void MetaRecoveryLogic_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DeleteConsumerWhileServerDown_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void NegativeReplicas_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void UserGivenConsName_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void UserGivenConsNameWithLeaderChange_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void MirrorCrossDomainOnLeadnodeNoSystemShare_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void FirstSeqMismatch_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerInactiveThreshold_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamLagWarning_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void SignalPullConsumersOnDelete_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void SourceWithOptStartTime_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ScaleDownWhileNoQuorum_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void HAssetsEnforcement_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestStreamConsumer_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void NoPanicOnStreamInfoWhenNoLeaderYet_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void NoTimeoutOnStreamInfoOnPreferredLeader_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void PullConsumerAcksExtendInactivityThreshold_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ParallelStreamCreation_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ParallelStreamCreationDupeRaftGroups_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ParallelConsumerCreation_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void GhostEphemeralsAfterRestart_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ReplacementPolicyAfterPeerRemove_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ReplacementPolicyAfterPeerRemoveNoPlace_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void LeafnodeDuplicateConsumerMessages_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void AfterPeerRemoveZeroState_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void MemLeaderRestart_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void LostConsumers_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ScaleDownDuringServerOffline_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DirectGetStreamUpgrade_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestPolicyStreamForConsumersToMatchRFactor_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void KVWatchersWithServerDown_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void CurrentVsHealth_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ActiveActiveSourcedStreams_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void UpdateConsumerShouldNotForceDeleteOnRestart_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestPolicyEphemeral_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void WALBuildupOnNoOpPull_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamMaxAgeScaleUp_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void WorkQueueConsumerReplicatedAfterScaleUp_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void WorkQueueAfterScaleUp_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestBasedStreamAndConsumerSnapshots_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerFollowerStoreStateAckFloorBug_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestLeakOnDisableJetStream_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void NoLeadersDuringLameDuck_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void NoR1AssetsDuringLameDuck_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerAckFloorDrift_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestStreamFilteredConsumersWithNoInterest_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ChangeClusterAfterStreamCreate_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerInfoForJszForFollowers_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamNodeShutdownBugOnStop_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamAccountingOnStoreError_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamAccountingDriftFixups_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamScaleUpNoGroupCluster_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StaleDirectGetOnRestart_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void LeafnodePlusDaisyChainSetup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void PurgeExReplayAfterRestart_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerCleanupWithSameName_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerActions_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void SnapshotAndRestoreWithHealthz_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void BinaryStreamSnapshotCapability_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void BadEncryptKey_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void AccountUsageDrifts_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamFailTracking_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamFailTrackingSnapshots_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void OrphanConsumerSubjects_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DurableConsumerInactiveThresholdLeaderSwitch_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerMaxDeliveryNumAckPendingBug_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerDefaultsFromStream_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void CheckFileStoreBlkSizes_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DetectOrphanNRGs_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamLimitsOnScaleUpAndMove_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void APIAccessViaSystemAccount_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamResetPreacks_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DomainAdvisory_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void LimitsBasedStreamFileStoreDesync_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void AccountFileStoreLimits_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void CorruptMetaSnapshot_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ProcessSnapshotPanicAfterStreamDelete_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DiscardNewPerSubjectRejectsWithoutCLFSBump_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamDesyncDuringSnapshot_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void DeletedNodeDoesNotReviveStreamAfterCatchup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void LeakedSubsWithStreamImportOverlappingJetStreamSubs_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void InterestStreamWithConsumerFilterUpdate_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamRecreateChangesRaftGroup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamScaleDownChangesRaftGroup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamRescaleCatchup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerRecreateChangesRaftGroup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerScaleDownChangesRaftGroup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerRescaleCatchup_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConcurrentStreamUpdate_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConcurrentConsumerCreateWithMaxConsumers_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void LostConsumerAfterInflightConsumerUpdate_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamRaftGroupChangesWhenMovingToOrOffR1_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void ConsumerRaftGroupChangesWhenMovingToOrOffR1_ShouldSucceed() { }

    [Fact(Skip = "deferred: requires running NATS server")]
    public void StreamUpdateMaxConsumersLimit_ShouldSucceed() { }
}
