summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Bulhak <andrew.bulhak@mullvad.net>2024-02-05 12:56:50 +0100
committerBug Magnet <marco.nikic@mullvad.net>2024-02-07 15:13:22 +0100
commite7a74251071f088fef1f5db97cc3ae1c2d890f64 (patch)
tree4fc5948a5d28d84266312aefab257cfe4eb5e151
parent8a15d2808a7091a28f1fe883d7a11ae271f68e7c (diff)
downloadmullvadvpn-e7a74251071f088fef1f5db97cc3ae1c2d890f64.tar.xz
mullvadvpn-e7a74251071f088fef1f5db97cc3ae1c2d890f64.zip
Muscellaneous changes from pull request
-rw-r--r--ios/MullvadVPNTests/StartTunnelOperationTests.swift12
1 files changed, 6 insertions, 6 deletions
diff --git a/ios/MullvadVPNTests/StartTunnelOperationTests.swift b/ios/MullvadVPNTests/StartTunnelOperationTests.swift
index 73553fe69d..002d27d0fd 100644
--- a/ios/MullvadVPNTests/StartTunnelOperationTests.swift
+++ b/ios/MullvadVPNTests/StartTunnelOperationTests.swift
@@ -13,14 +13,14 @@ import Network
import WireGuardKitTypes
-final class StartTunnelOperationTests: XCTestCase {
+class StartTunnelOperationTests: XCTestCase {
let testQueue = DispatchQueue(label: "StartTunnelOperationTests.testQueue")
func testFailsIfNotLoggedIn() throws {
let operationQueue = AsyncOperationQueue()
let settings = LatestTunnelSettings()
- let expectation = XCTestExpectation(description:"")
+ let exp = expectation(description:"Start tunnel operation failed")
let operation = StartTunnelOperation(
dispatchQueue: testQueue,
interactor: MockTunnelInteractor(isConfigurationLoaded: true, settings: settings, deviceState: .loggedOut)) { result in
@@ -29,11 +29,11 @@ final class StartTunnelOperationTests: XCTestCase {
XCTFail("Operation returned \(result), not failure")
return
}
- expectation.fulfill()
+ exp.fulfill()
}
operationQueue.addOperation(operation)
- wait(for: [expectation], timeout: 10.0)
+ wait(for: [exp], timeout: 1.0)
}
func testSetsReconnectIfDisconnecting() {
@@ -63,7 +63,7 @@ final class StartTunnelOperationTests: XCTestCase {
tunnelStatus.state = .disconnecting(.nothing)
interactor.tunnelStatus = tunnelStatus
interactor.onUpdateTunnelStatus = { status in tunnelStatus = status }
- let expectation = XCTestExpectation(description:"")
+ let expectation = expectation(description:"Tunnel status set to reconnect")
let operation = StartTunnelOperation(
dispatchQueue: testQueue,
@@ -72,6 +72,6 @@ final class StartTunnelOperationTests: XCTestCase {
expectation.fulfill()
}
operationQueue.addOperation(operation)
- wait(for: [expectation], timeout: 10.0)
+ wait(for: [expectation], timeout: 1.0)
}
}