public void TestBasicRejectAfterChannelRecovery()
        {
            var latch = new ManualResetEventSlim(false);
            var cons  = new RejectingBasicConsumer(_model, latch, CloseAndWaitForRecovery);

            TestDelayedBasicAckNackAfterChannelRecovery(cons, latch);
        }
        public void TestBasicRejectAfterChannelRecovery()
        {
            var latch = new AutoResetEvent(false);
            var cons  = new RejectingBasicConsumer(Model, latch, () => {
                CloseAndWaitForRecovery();
            });

            TestDelayedBasicAckNackAfterChannelRecovery(cons, latch);
        }
        public void TestBasicRejectAfterChannelRecovery()
        {
            var allMessagesSeenLatch = new ManualResetEventSlim(false);
            var cons = new RejectingBasicConsumer(_model, _totalMessageCount, allMessagesSeenLatch);

            string queueName = _model.QueueDeclare(_queueName, false, false, false, null).QueueName;

            Assert.Equal(queueName, _queueName);

            _model.BasicQos(0, 1, false);
            string consumerTag = _model.BasicConsume(queueName, false, cons);

            ManualResetEventSlim sl = PrepareForShutdown(_conn);
            ManualResetEventSlim rl = PrepareForRecovery(_conn);

            PublishMessagesWhileClosingConn(queueName);

            Wait(sl);
            Wait(rl);
            Wait(allMessagesSeenLatch);
        }
        public void TestBasicRejectAfterChannelRecovery()
        {
            var latch = new ManualResetEvent(false);
            var cons = new RejectingBasicConsumer(Model, latch, () => { CloseAndWaitForRecovery(); });

            TestDelayedBasicAckNackAfterChannelRecovery(cons, latch);
        }