File tree Expand file tree Collapse file tree 9 files changed +37
-28
lines changed
Examples/BackgroundTasks/Sources
AWSLambdaRuntime/Vendored
Tests/AWSLambdaRuntimeCoreTests Expand file tree Collapse file tree 9 files changed +37
-28
lines changed Original file line number Diff line number Diff line change 1313//===----------------------------------------------------------------------===//
1414
1515import AWSLambdaRuntime
16+
1617#if canImport(FoundationEssentials)
1718import FoundationEssentials
1819#else
Original file line number Diff line number Diff line change 2626//
2727//===----------------------------------------------------------------------===//
2828
29+ import NIOCore
30+
2931#if canImport(FoundationEssentials)
3032import FoundationEssentials
3133#else
3234import Foundation
3335#endif
34- import NIOCore
3536
3637// This is NIO's `NIOFoundationCompat` module which at the moment only adds `ByteBuffer` utility methods
3738// for Foundation's `Data` type.
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ import Logging
16+ import NIOConcurrencyHelpers
17+ import NIOCore
18+
1519#if canImport(FoundationEssentials)
1620import FoundationEssentials
1721#else
1822import Foundation
1923#endif
20- import Logging
21- import NIOConcurrencyHelpers
22- import NIOCore
2324
2425// We need `@unchecked` Sendable here, as `NIOLockedValueBox` does not understand `sending` today.
2526// We don't want to use `NIOLockedValueBox` here anyway. We would love to use Mutex here, but this
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ import Dispatch
16+ import NIOCore
17+ import NIOHTTP1
18+ import NIOPosix
19+
1520#if canImport(FoundationEssentials)
1621import FoundationEssentials
1722#else
1823import Foundation
1924#endif
20- import NIOCore
21- import NIOHTTP1
22- import NIOPosix
23- import Dispatch
2425
2526struct MockServer {
2627 private let group : EventLoopGroup
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ import NIOHTTP1
16+ import Testing
17+
18+ @testable import AWSLambdaRuntimeCore
19+
1520#if canImport(FoundationEssentials)
1621import FoundationEssentials
1722#else
1823import Foundation
1924#endif
20- import NIOHTTP1
21- import Testing
22-
23- @testable import AWSLambdaRuntimeCore
2425
2526@Suite
2627struct InvocationTest {
Original file line number Diff line number Diff line change 1313//===----------------------------------------------------------------------===//
1414
1515import AWSLambdaRuntimeCore
16+ import Logging
17+ import NIOCore
18+
1619#if canImport(FoundationEssentials)
1720import FoundationEssentials
1821#else
1922import Foundation
2023#endif
21- import Logging
22- import NIOCore
2324
2425struct LambdaMockWriter : LambdaRuntimeClientResponseStreamWriter {
2526 var underlying : LambdaMockClient
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ import NIOCore
16+ import Testing
17+
18+ @testable import AWSLambdaRuntimeCore
19+
1520#if canImport(FoundationEssentials)
1621import FoundationEssentials
1722#else
1823import Foundation
1924#endif
20- import NIOCore
21- import Testing
22-
23- @testable import AWSLambdaRuntimeCore
2425
2526@Suite ( " LambdaRequestID tests " )
2627struct LambdaRequestIDTest {
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15- #if canImport(FoundationEssentials)
16- import FoundationEssentials
17- #else
18- import Foundation
19- #endif
2015import Logging
2116import NIOCore
2217import Testing
2318
2419@testable import AWSLambdaRuntimeCore
2520
21+ #if canImport(FoundationEssentials)
22+ import FoundationEssentials
23+ #else
24+ import Foundation
25+ #endif
26+
2627@Suite
2728struct LambdaRunLoopTests {
2829 struct MockEchoHandler : StreamingLambdaHandler {
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15- #if canImport(FoundationEssentials)
16- import FoundationEssentials
17- #else
18- import Foundation
19- #endif
2015import Logging
2116import NIOCore
2217import NIOHTTP1
2318import NIOPosix
2419
2520@testable import AWSLambdaRuntimeCore
2621
22+ #if canImport(FoundationEssentials)
23+ import FoundationEssentials
24+ #else
25+ import Foundation
26+ #endif
27+
2728func withMockServer< Result> (
2829 behaviour: some LambdaServerBehavior ,
2930 port: Int = 0 ,
You can’t perform that action at this time.
0 commit comments