@@ -60,7 +60,7 @@ final class EphemeralPeerExchangingPipelineTests: XCTestCase {
60
60
)
61
61
}
62
62
63
- func testSingleHopPostQuantumKeyExchange( ) throws {
63
+ func testSingleHopPostQuantumKeyExchange( ) async throws {
64
64
let reconfigurationExpectation = expectation ( description: " Tunnel reconfiguration took place " )
65
65
reconfigurationExpectation. expectedFulfillmentCount = 2
66
66
@@ -78,19 +78,19 @@ final class EphemeralPeerExchangingPipelineTests: XCTestCase {
78
78
}
79
79
80
80
keyExchangeActor. delegate = KeyExchangingResultStub ( onReceivePostQuantumKey: { preSharedKey, privateKey in
81
- postQuantumKeyExchangingPipeline. receivePostQuantumKey ( preSharedKey, ephemeralKey: privateKey)
81
+ await postQuantumKeyExchangingPipeline. receivePostQuantumKey ( preSharedKey, ephemeralKey: privateKey)
82
82
} )
83
83
84
84
let connectionState = stubConnectionState ( enableMultiHop: false , enablePostQuantum: true , enableDaita: false )
85
- postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
85
+ await postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
86
86
87
87
wait (
88
88
for: [ reconfigurationExpectation, negotiationSuccessful] ,
89
89
timeout: . UnitTest. invertedTimeout
90
90
)
91
91
}
92
92
93
- func testSingleHopDaitaPeerExchange( ) throws {
93
+ func testSingleHopDaitaPeerExchange( ) async throws {
94
94
let reconfigurationExpectation = expectation ( description: " Tunnel reconfiguration took place " )
95
95
reconfigurationExpectation. expectedFulfillmentCount = 2
96
96
@@ -108,19 +108,19 @@ final class EphemeralPeerExchangingPipelineTests: XCTestCase {
108
108
}
109
109
110
110
keyExchangeActor. delegate = KeyExchangingResultStub ( onReceiveEphemeralPeerPrivateKey: { privateKey in
111
- postQuantumKeyExchangingPipeline. receiveEphemeralPeerPrivateKey ( privateKey)
111
+ await postQuantumKeyExchangingPipeline. receiveEphemeralPeerPrivateKey ( privateKey)
112
112
} )
113
113
114
114
let connectionState = stubConnectionState ( enableMultiHop: false , enablePostQuantum: false , enableDaita: true )
115
- postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
115
+ await postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
116
116
117
117
wait (
118
118
for: [ reconfigurationExpectation, negotiationSuccessful] ,
119
119
timeout: . UnitTest. invertedTimeout
120
120
)
121
121
}
122
122
123
- func testMultiHopPostQuantumKeyExchange( ) throws {
123
+ func testMultiHopPostQuantumKeyExchange( ) async throws {
124
124
let reconfigurationExpectation = expectation ( description: " Tunnel reconfiguration took place " )
125
125
reconfigurationExpectation. expectedFulfillmentCount = 3
126
126
@@ -138,19 +138,19 @@ final class EphemeralPeerExchangingPipelineTests: XCTestCase {
138
138
}
139
139
140
140
keyExchangeActor. delegate = KeyExchangingResultStub ( onReceivePostQuantumKey: { preSharedKey, privateKey in
141
- postQuantumKeyExchangingPipeline. receivePostQuantumKey ( preSharedKey, ephemeralKey: privateKey)
141
+ await postQuantumKeyExchangingPipeline. receivePostQuantumKey ( preSharedKey, ephemeralKey: privateKey)
142
142
} )
143
143
144
144
let connectionState = stubConnectionState ( enableMultiHop: true , enablePostQuantum: true , enableDaita: false )
145
- postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
145
+ await postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
146
146
147
147
wait (
148
148
for: [ reconfigurationExpectation, negotiationSuccessful] ,
149
149
timeout: . UnitTest. invertedTimeout
150
150
)
151
151
}
152
152
153
- func testMultiHopDaitaExchange( ) throws {
153
+ func testMultiHopDaitaExchange( ) async throws {
154
154
let reconfigurationExpectation = expectation ( description: " Tunnel reconfiguration took place " )
155
155
reconfigurationExpectation. expectedFulfillmentCount = 3
156
156
@@ -168,11 +168,11 @@ final class EphemeralPeerExchangingPipelineTests: XCTestCase {
168
168
}
169
169
170
170
keyExchangeActor. delegate = KeyExchangingResultStub ( onReceiveEphemeralPeerPrivateKey: { privateKey in
171
- postQuantumKeyExchangingPipeline. receiveEphemeralPeerPrivateKey ( privateKey)
171
+ await postQuantumKeyExchangingPipeline. receiveEphemeralPeerPrivateKey ( privateKey)
172
172
} )
173
173
174
174
let connectionState = stubConnectionState ( enableMultiHop: true , enablePostQuantum: false , enableDaita: true )
175
- postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
175
+ await postQuantumKeyExchangingPipeline. startNegotiation ( connectionState, privateKey: PrivateKey ( ) )
176
176
177
177
wait (
178
178
for: [ reconfigurationExpectation, negotiationSuccessful] ,
0 commit comments