swift-nio-extras/Tests/NIOExtrasTests/WritePCAPHandlerTest+XCTest.swift
Johannes Weiss 7cd24c0efc
WritePCAPHandler: support logging more than 4GiB of data (#85)
Motivation:

Previously, WritePCAPHandler would crash if more than 4GiB of data were
either received or sent through the same instance of the
WritePCAPHandler because of a UInt32 overflow representing the TCP
sequence/ACK numbers.

Modifications:

Make TCP sequence/ACK numbers wrap around correctly.

Result:

- now you can send/receive up to 16 EiB of data :P.
- fixes rdar://61887658
2020-05-18 11:37:20 +01:00

48 lines
2.3 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
//
//===----------------------------------------------------------------------===//
//
// WritePCAPHandlerTest+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 WritePCAPHandlerTest {
static var allTests : [(String, (WritePCAPHandlerTest) -> () throws -> Void)] {
return [
("testConnectIssuesThreePacketsForIPv4", testConnectIssuesThreePacketsForIPv4),
("testConnectIssuesThreePacketsForIPv6", testConnectIssuesThreePacketsForIPv6),
("testAcceptConnectionFromRemote", testAcceptConnectionFromRemote),
("testCloseOriginatingFromLocal", testCloseOriginatingFromLocal),
("testCloseOriginatingFromRemote", testCloseOriginatingFromRemote),
("testInboundData", testInboundData),
("testOutboundData", testOutboundData),
("testOversizedInboundDataComesAsTwoPacketsIPv4", testOversizedInboundDataComesAsTwoPacketsIPv4),
("testOversizedInboundDataComesAsTwoPacketsIPv6", testOversizedInboundDataComesAsTwoPacketsIPv6),
("testOversizedOutboundDataComesAsTwoPacketsIPv4", testOversizedOutboundDataComesAsTwoPacketsIPv4),
("testOversizedOutboundDataComesAsTwoPacketsIPv6", testOversizedOutboundDataComesAsTwoPacketsIPv6),
("testUnflushedOutboundDataIsNotWritten", testUnflushedOutboundDataIsNotWritten),
("testDataWrittenAfterCloseIsDiscarded", testDataWrittenAfterCloseIsDiscarded),
("testUnflushedOutboundDataIsWrittenWhenEmittingWritesOnIssue", testUnflushedOutboundDataIsWrittenWhenEmittingWritesOnIssue),
("testWeDoNotCrashIfMoreThan4GBOfDataGoThrough", testWeDoNotCrashIfMoreThan4GBOfDataGoThrough),
]
}
}