public void The_message_should_not_exist_in_the_error_queue()
        {
            _future.IsAvailable(3.Seconds())
            .ShouldBeTrue();

            LocalErrorEndpoint.ShouldNotContain(_ping);
        }
        public void Should_process_the_messages_in_order_and_not_at_the_same_time()
        {
            Guid transactionId = NewId.NextGuid();

            Trace.WriteLine("Creating transaction for " + transactionId);

            int startValue = 1;

            var startConcurrentSaga = new StartConcurrentSaga
            {
                CorrelationId = transactionId, Name = "Chris", Value = startValue
            };

            LocalBus.Publish(startConcurrentSaga);
            LocalBus.Publish(startConcurrentSaga);
            Trace.WriteLine("Just published the start message");

            _sagaRepository.ShouldContainSaga(transactionId).ShouldNotBeNull();

            int nextValue = 2;
            var continueConcurrentSaga = new ContinueConcurrentSaga {
                CorrelationId = transactionId, Value = nextValue
            };

            LocalBus.Publish(continueConcurrentSaga);
            Trace.WriteLine("Just published the continue message");

            _sagaRepository.ShouldContainSaga(x => x.CorrelationId == transactionId && x.Value == nextValue).
            ShouldNotBeNull();

            Thread.Sleep(8000);

            LocalEndpoint.ShouldNotContain <StartConcurrentSaga>();
            LocalErrorEndpoint.ShouldContain <StartConcurrentSaga>();
        }
        protected override void TeardownContext()
        {
            LocalBus.Dispose();
            LocalBus = null;

            RemoteBus.Dispose();
            RemoteBus = null;

            LocalEndpoint.Dispose();
            LocalEndpoint = null;

            LocalErrorEndpoint.Dispose();
            LocalErrorEndpoint = null;

            base.TeardownContext();
        }
 public void The_message_should_exist_in_the_error_queue()
 {
     LocalErrorEndpoint.ShouldContain(_ping, 5.Seconds());
 }
Beispiel #5
0
 public void The_message_should_exist_in_the_error_queue()
 {
     LocalErrorEndpoint.ShouldContain(_ping, Debugger.IsAttached ? 300.Seconds() : 5.Seconds());
 }