Files
swift-nio-http2/Tests/NIOHTTP2Tests/SimpleClientServerTests+XCTest.swift
T
Cory Benfield bde711f760 Account for window size of stream closing frames (#174)
Motivation:

Frames that close a stream may consume some of the connection window. We
were not correctly accounting for that in the code, which meant that
frames that carried END_STREAM would not notify the stream multiplexer
that they had consumed connection window space. In the worst cases this
could lead to resource starvation due to consumption of this window
without causing us to emit new WINDOW_UPDATE frames.

Modifications:

StreamClosedEvents should be followed by flow control change events.

Result:

We will correctly update the connection window when a stream is closed.
2019-11-28 08:41:27 +00:00

78 lines
5.1 KiB
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
//
// SimpleClientServerTests+XCTest.swift
//
import XCTest
///
/// NOTE: This file was generated by generate_linux_tests.rb
///
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
///
extension SimpleClientServerTests {
static var allTests : [(String, (SimpleClientServerTests) -> () throws -> Void)] {
return [
("testBasicRequestResponse", testBasicRequestResponse),
("testBasicRequestResponseWithDynamicPipeline", testBasicRequestResponseWithDynamicPipeline),
("testManyRequestsAtOnce", testManyRequestsAtOnce),
("testNothingButGoaway", testNothingButGoaway),
("testGoAwayWithStreamsUpQuiescing", testGoAwayWithStreamsUpQuiescing),
("testLargeDataFramesAreSplit", testLargeDataFramesAreSplit),
("testSendingDataFrameWithSmallFile", testSendingDataFrameWithSmallFile),
("testSendingDataFrameWithLargeFile", testSendingDataFrameWithLargeFile),
("testMoreRequestsThanMaxConcurrentStreamsAtOnce", testMoreRequestsThanMaxConcurrentStreamsAtOnce),
("testOverridingDefaultSettings", testOverridingDefaultSettings),
("testBasicPingFrames", testBasicPingFrames),
("testAutomaticFlowControl", testAutomaticFlowControl),
("testPartialFrame", testPartialFrame),
("testSendingTrailers", testSendingTrailers),
("test1XXResponseHeaderFields", test1XXResponseHeaderFields),
("testPriorityFrames", testPriorityFrames),
("testStreamClosedWithNoError", testStreamClosedWithNoError),
("testStreamClosedViaRstStream", testStreamClosedViaRstStream),
("testStreamClosedViaGoaway", testStreamClosedViaGoaway),
("testStreamCloseEventForRstStreamFiresAfterFrame", testStreamCloseEventForRstStreamFiresAfterFrame),
("testStreamCloseEventForGoawayFiresAfterFrame", testStreamCloseEventForGoawayFiresAfterFrame),
("testManyConcurrentInactiveStreams", testManyConcurrentInactiveStreams),
("testBadClientMagic", testBadClientMagic),
("testOpeningWindowsViaSettingsInitialWindowSize", testOpeningWindowsViaSettingsInitialWindowSize),
("testSettingsAckNotifiesAboutChangedFlowControl", testSettingsAckNotifiesAboutChangedFlowControl),
("testStreamMultiplexerAcknowledgesSettingsBasedFlowControlChanges", testStreamMultiplexerAcknowledgesSettingsBasedFlowControlChanges),
("testChangingMaxFrameSize", testChangingMaxFrameSize),
("testStreamErrorOnSelfDependentPriorityFrames", testStreamErrorOnSelfDependentPriorityFrames),
("testStreamErrorOnSelfDependentHeadersFrames", testStreamErrorOnSelfDependentHeadersFrames),
("testInvalidRequestHeaderBlockAllowsRstStream", testInvalidRequestHeaderBlockAllowsRstStream),
("testClientConnectionErrorCorrectlyReported", testClientConnectionErrorCorrectlyReported),
("testChangingMaxConcurrentStreams", testChangingMaxConcurrentStreams),
("testFailsPromisesForBufferedWrites", testFailsPromisesForBufferedWrites),
("testAllowPushPromiseBeforeReceivingHeadersNoBody", testAllowPushPromiseBeforeReceivingHeadersNoBody),
("testAllowPushPromiseBeforeReceivingHeadersWithPossibleBody", testAllowPushPromiseBeforeReceivingHeadersWithPossibleBody),
("testSequentialEmptyDataFramesIsForbidden", testSequentialEmptyDataFramesIsForbidden),
("testSequentialEmptyDataFramesLimitIsConfigurable", testSequentialEmptyDataFramesLimitIsConfigurable),
("testDenialOfServiceViaPing", testDenialOfServiceViaPing),
("testDenialOfServiceViaSettings", testDenialOfServiceViaSettings),
("testFramesArentWrittenWhenChannelIsntWritable", testFramesArentWrittenWhenChannelIsntWritable),
("testEnforcingMaxHeaderListSize", testEnforcingMaxHeaderListSize),
("testForbidsExceedingMaxHeaderListSizeBeforeDecoding", testForbidsExceedingMaxHeaderListSizeBeforeDecoding),
("testForbidsExceedingMaxHeaderListSizeBeforeDecodingSingleFrame", testForbidsExceedingMaxHeaderListSizeBeforeDecodingSingleFrame),
("testNoStreamWindowUpdateOnEndStreamFrameFromServer", testNoStreamWindowUpdateOnEndStreamFrameFromServer),
("testNoStreamWindowUpdateOnEndStreamFrameFromClient", testNoStreamWindowUpdateOnEndStreamFrameFromClient),
]
}
}