예제 #1
0
        public void status_is_accepting_and_below_the_threshold()
        {
            theRoot.Workers.QueuedCount.Returns(theRoot.Settings.MaximumLocalEnqueuedBackPressureThreshold - 5);
            theRoot.ListeningStatus = ListeningStatus.Accepting;

            theAgent.ApplyBackPressure();

            theRoot.ListeningStatus.ShouldBe(ListeningStatus.Accepting);
        }
        public void status_is_accepting_and_above_the_threshold()
        {
            theRoot.Workers.QueuedCount.Returns(theRoot.Options.MaximumLocalEnqueuedBackPressureThreshold + 5);
            theRoot.ListeningStatus = ListeningStatus.Accepting;

            theAgent.ApplyBackPressure();

            theRoot.ListeningStatus.ShouldBe(ListeningStatus.TooBusy);
        }