mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-28 05:14:25 +00:00
Motivation: Less expensive stream multiplexing. To implement direct stream multiplexing (with an incomplete public API) to break up delivery and allow testing. Modifications: * Factor out common inbound stream multiplexer functionality from `HTTP2StreamMultiplexer` into `CommonInboundStreamMultiplexer` (first commit). * Direct stream multiplexing is implemented as `InlineStreamMultiplexer`. It implements both the `HTTP2InboundStreamMultiplexer` and `HTTP2OutboundStreamMultiplexer` protocols. * We expose `NIOHTTP2Hander.StreamMultiplexer` as a `public` view over the new multiplexer to allow stream creation. * Adds various `propagate...` functions to relay signals such as read complete to the child channels held by the inline stream multiplexer. * Adds a stub for `HTTP2StreamDelegate` which will be completed in an upcoming PR. It will be responsible for surfacing stream open/close information. * Adds conveniences to `NIOHTTP2Handler` for setting up a handler using the inline multiplexer * Duplicate existing tests and modify to use the inline stream multiplexer where appropriate. `SimpleClientServerFramePayloadStreamTests.swift` and `HTTP2FramePayloadStreamMultiplexerTests.swift` were copied and modified Result: Default behavior should be unchanged at this time.
70 lines
3.0 KiB
Swift
70 lines
3.0 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// LinuxMain.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.
|
|
///
|
|
|
|
#if os(Linux) || os(FreeBSD) || os(Android)
|
|
@testable import NIOHPACKTests
|
|
@testable import NIOHTTP2Tests
|
|
|
|
@main
|
|
@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
|
|
class LinuxMainRunner {
|
|
@available(*, deprecated, message: "not actually deprecated. Just deprecated to allow deprecated tests (which test deprecated functionality) without warnings")
|
|
static func main() {
|
|
XCTMain([
|
|
testCase(CircularBufferExtensionsTests.allTests),
|
|
testCase(CompoundOutboundBufferTest.allTests),
|
|
testCase(ConcurrentStreamBufferTests.allTests),
|
|
testCase(ConfiguringPipelineTests.allTests),
|
|
testCase(ConfiguringPipelineWithFramePayloadStreamsTests.allTests),
|
|
testCase(ConnectionStateMachineTests.allTests),
|
|
testCase(ContentLengthVerifierTests.allTests),
|
|
testCase(ControlFrameBufferTests.allTests),
|
|
testCase(HPACKCodingTests.allTests),
|
|
testCase(HPACKHeadersTests.allTests),
|
|
testCase(HPACKIntegrationTests.allTests),
|
|
testCase(HPACKRegressionTests.allTests),
|
|
testCase(HTTP2ErrorTests.allTests),
|
|
testCase(HTTP2FrameParserTests.allTests),
|
|
testCase(HTTP2FramePayloadStreamMultiplexerTests.allTests),
|
|
testCase(HTTP2FramePayloadToHTTP1CodecTests.allTests),
|
|
testCase(HTTP2InlineStreamMultiplexerTests.allTests),
|
|
testCase(HTTP2StreamMultiplexerTests.allTests),
|
|
testCase(HTTP2ToHTTP1CodecTests.allTests),
|
|
testCase(HeaderTableTests.allTests),
|
|
testCase(HuffmanCodingTests.allTests),
|
|
testCase(InboundWindowManagerTests.allTests),
|
|
testCase(IntegerCodingTests.allTests),
|
|
testCase(OutboundFlowControlBufferTests.allTests),
|
|
testCase(ReentrancyTests.allTests),
|
|
testCase(SimpleClientServerFramePayloadStreamTests.allTests),
|
|
testCase(SimpleClientServerInlineStreamMultiplexerTests.allTests),
|
|
testCase(SimpleClientServerTests.allTests),
|
|
testCase(StreamChannelFlowControllerTests.allTests),
|
|
testCase(StreamIDTests.allTests),
|
|
testCase(StreamMapTests.allTests),
|
|
])
|
|
}
|
|
}
|
|
#endif
|