public void GlobalSetup()
    {
        _middlewareQueue = TestUtils.CreateTestMiddleware_QueuePolicy(
            maxConcurrentRequests: MaxConcurrentRequests,
            requestQueueLimit: _numRequests,
            next: IncrementAndCheck);

        _middlewareStack = TestUtils.CreateTestMiddleware_StackPolicy(
            maxConcurrentRequests: MaxConcurrentRequests,
            requestQueueLimit: _numRequests,
            next: IncrementAndCheck);
    }
Exemple #2
0
        public void GlobalSetup()
        {
            _restOfServer = YieldsThreadInternally ? (RequestDelegate)YieldsThread : (RequestDelegate)CompletesImmediately;

            _middlewareFIFO = TestUtils.CreateTestMiddleware_TailDrop(
                maxConcurrentRequests: 1,
                requestQueueLimit: 100,
                next: _restOfServer);

            _middlewareLIFO = TestUtils.CreateTestMiddleware_StackPolicy(
                maxConcurrentRequests: 1,
                requestQueueLimit: 100,
                next: _restOfServer);
        }
    public void GlobalSetup()
    {
        _middlewareQueue = TestUtils.CreateTestMiddleware_QueuePolicy(
            maxConcurrentRequests: 1,
            requestQueueLimit: 20,
            next: WaitForever,
            onRejected: IncrementRejections);

        _middlewareStack = TestUtils.CreateTestMiddleware_StackPolicy(
            maxConcurrentRequests: 1,
            requestQueueLimit: 20,
            next: WaitForever,
            onRejected: IncrementRejections);
    }