diff --git a/Example/IntegrationTests/Auth/AuthTests.swift b/Example/IntegrationTests/Auth/AuthTests.swift index 6abe13983..ddf627388 100644 --- a/Example/IntegrationTests/Auth/AuthTests.swift +++ b/Example/IntegrationTests/Auth/AuthTests.swift @@ -12,6 +12,8 @@ final class AuthTests: XCTestCase { let prvKey = Data(hex: "462c1dad6832d7d96ccf87bd6a686a4110e114aaaebd5512e552c0e3a87b480f") private var publishers = [AnyCancellable]() + private let defaultTimeout: TimeInterval = 30 + override func setUp() { app = makeClient(prefix: "👻 App") let walletAccount = Account(chainIdentifier: "eip155:1", address: "0x724d0D2DaD3fbB0C168f947B87Fa5DBe36F1A8bf")! @@ -57,7 +59,7 @@ final class AuthTests: XCTestCase { wallet.authRequestPublisher.sink { _ in requestExpectation.fulfill() }.store(in: &publishers) - wait(for: [requestExpectation], timeout: 2) + wait(for: [requestExpectation], timeout: defaultTimeout) } func testRespondSuccess() async { @@ -76,7 +78,7 @@ final class AuthTests: XCTestCase { responseExpectation.fulfill() } .store(in: &publishers) - wait(for: [responseExpectation], timeout: 5) + wait(for: [responseExpectation], timeout: defaultTimeout) } func testUserRespondError() async { @@ -95,7 +97,7 @@ final class AuthTests: XCTestCase { responseExpectation.fulfill() } .store(in: &publishers) - wait(for: [responseExpectation], timeout: 5) + wait(for: [responseExpectation], timeout: defaultTimeout) } func testRespondSignatureVerificationFailed() async { @@ -116,7 +118,7 @@ final class AuthTests: XCTestCase { responseExpectation.fulfill() } .store(in: &publishers) - wait(for: [responseExpectation], timeout: 2) + wait(for: [responseExpectation], timeout: defaultTimeout) } func testPing() async { @@ -130,6 +132,6 @@ final class AuthTests: XCTestCase { pingExpectation.fulfill() } .store(in: &publishers) - wait(for: [pingExpectation], timeout: 5) + wait(for: [pingExpectation], timeout: defaultTimeout) } } diff --git a/Example/IntegrationTests/Chat/ChatTests.swift b/Example/IntegrationTests/Chat/ChatTests.swift index 191ea398f..c3fb91acd 100644 --- a/Example/IntegrationTests/Chat/ChatTests.swift +++ b/Example/IntegrationTests/Chat/ChatTests.swift @@ -12,6 +12,8 @@ final class ChatTests: XCTestCase { var registry: KeyValueRegistry! private var publishers = [AnyCancellable]() + private let defaultTimeout: TimeInterval = 30 + override func setUp() { registry = KeyValueRegistry() invitee = makeClient(prefix: "🦖 Registered") @@ -56,7 +58,7 @@ final class ChatTests: XCTestCase { invitee.invitePublisher.sink { _ in inviteExpectation.fulfill() }.store(in: &publishers) - wait(for: [inviteExpectation], timeout: 4) + wait(for: [inviteExpectation], timeout: defaultTimeout) } func testAcceptAndCreateNewThread() { @@ -83,7 +85,7 @@ final class ChatTests: XCTestCase { newThreadInviterExpectation.fulfill() }.store(in: &publishers) - wait(for: [newThreadinviteeExpectation, newThreadInviterExpectation], timeout: 10) + wait(for: [newThreadinviteeExpectation, newThreadInviterExpectation], timeout: defaultTimeout) } func testMessage() { @@ -118,6 +120,6 @@ final class ChatTests: XCTestCase { messageExpectation.fulfill() }.store(in: &publishers) - wait(for: [messageExpectation], timeout: 10) + wait(for: [messageExpectation], timeout: defaultTimeout) } } diff --git a/Example/IntegrationTests/Relay/RelayClientEndToEndTests.swift b/Example/IntegrationTests/Relay/RelayClientEndToEndTests.swift index d456d69dc..1cfae786c 100644 --- a/Example/IntegrationTests/Relay/RelayClientEndToEndTests.swift +++ b/Example/IntegrationTests/Relay/RelayClientEndToEndTests.swift @@ -7,11 +7,11 @@ import Starscream final class RelayClientEndToEndTests: XCTestCase { - let defaultTimeout: TimeInterval = 10 - let projectId = "3ca2919724fbfa5456a25194e369a8b4" private var publishers = Set() + private let defaultTimeout: TimeInterval = 30 + func makeRelayClient() -> RelayClient { let clientIdStorage = ClientIdStorage(keychain: KeychainStorageMock()) let socketAuthenticator = SocketAuthenticator( diff --git a/Example/IntegrationTests/Sign/SignClientTests.swift b/Example/IntegrationTests/Sign/SignClientTests.swift index e00529b0b..a7088a30f 100644 --- a/Example/IntegrationTests/Sign/SignClientTests.swift +++ b/Example/IntegrationTests/Sign/SignClientTests.swift @@ -6,7 +6,7 @@ import WalletConnectUtils final class SignClientTests: XCTestCase { - let defaultTimeout: TimeInterval = 8 + private let defaultTimeout: TimeInterval = 30 var dapp: ClientDelegate! var wallet: ClientDelegate!