Exemplo n.º 1
0
 public void GlobalSetup()
 {
     _middleware = TestUtils.CreateTestMiddleware_TailDrop(
         maxConcurrentRequests: MaxConcurrentRequests,
         requestQueueLimit: _numRequests,
         next: IncrementAndCheck
         );
 }
Exemplo n.º 2
0
        public void GlobalSetup()
        {
            _restOfServer = YieldsThreadInternally ? (RequestDelegate)YieldsThread : (RequestDelegate)CompletesImmediately;

            _middleware = TestUtils.CreateTestMiddleware_TailDrop(
                maxConcurrentRequests: 1,
                requestQueueLimit: 0,
                next: _restOfServer);
        }
Exemplo n.º 3
0
        public void GlobalSetup()
        {
            var options = new RequestThrottlingOptions
            {
                MaxConcurrentRequests = MaxConcurrentRequests,
                RequestQueueLimit     = _numRequests
            };

            _middleware = new RequestThrottlingMiddleware(
                next: (RequestDelegate)_incrementAndCheck,
                loggerFactory: NullLoggerFactory.Instance,
                options: Options.Create(options)
                );
        }
Exemplo n.º 4
0
        public void GlobalSetup()
        {
            _restOfServer = YieldsThreadInternally ? (RequestDelegate)YieldsThread : (RequestDelegate)CompletesImmediately;

            var options = new RequestThrottlingOptions
            {
                MaxConcurrentRequests = 8,
                RequestQueueLimit     = _numRequests
            };

            _middleware = new RequestThrottlingMiddleware(
                next: _restOfServer,
                loggerFactory: NullLoggerFactory.Instance,
                options: Options.Create(options)
                );
        }