diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-10-24 12:31:46 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2025-10-27 11:36:33 +0100 |
| commit | 6834fad3f812547b004e9cdc108366a8fbab1e4a (patch) | |
| tree | fd3d8ca60359f1fb350751a5e21da463347f2092 /android/test | |
| parent | e8e8057072fad7d22b02d9768382e60bc3c686c3 (diff) | |
| download | mullvadvpn-6834fad3f812547b004e9cdc108366a8fbab1e4a.tar.xz mullvadvpn-6834fad3f812547b004e9cdc108366a8fbab1e4a.zip | |
Increase test timeout
Diffstat (limited to 'android/test')
| -rw-r--r-- | android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt b/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt index 83b04ee04c..d049525324 100644 --- a/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt +++ b/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt @@ -1,6 +1,7 @@ package net.mullvad.mullvadvpn.test.e2e import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.Duration.Companion.minutes import kotlinx.coroutines.delay import kotlinx.coroutines.test.runTest import net.mullvad.mullvadvpn.test.common.constant.EXTREMELY_LONG_TIMEOUT @@ -103,39 +104,40 @@ class ConnectionTest : EndToEndTest() { @Test @HasDependencyOnLocalAPI @ClearFirewallRules - fun testWireGuardObfuscationAutomatic() = runTest { - app.launchAndLogIn(accountTestRule.validAccountNumber) - on<ConnectPage> { enableLocalNetworkSharingStory() } + fun testWireGuardObfuscationAutomatic() = + runTest(timeout = 2.minutes) { + app.launchAndLogIn(accountTestRule.validAccountNumber) + on<ConnectPage> { enableLocalNetworkSharingStory() } - on<ConnectPage> { clickSelectLocation() } + on<ConnectPage> { clickSelectLocation() } - on<SelectLocationPage> { - clickLocationExpandButton(relayProvider.getDefaultRelay().country) - clickLocationExpandButton(relayProvider.getDefaultRelay().city) - clickLocationCell(relayProvider.getDefaultRelay().relay) - } + on<SelectLocationPage> { + clickLocationExpandButton(relayProvider.getDefaultRelay().country) + clickLocationExpandButton(relayProvider.getDefaultRelay().city) + clickLocationCell(relayProvider.getDefaultRelay().relay) + } - device.acceptVpnPermissionDialog() + device.acceptVpnPermissionDialog() - var relayIpAddress: String? = null + var relayIpAddress: String? = null - on<ConnectPage> { - waitForConnectedLabel() - relayIpAddress = extractInIpv4Address() - clickDisconnect() - } + on<ConnectPage> { + waitForConnectedLabel() + relayIpAddress = extractInIpv4Address() + clickDisconnect() + } - // Block UDP traffic to the relay - val firewallRule = DropRule.blockUDPTrafficRule(relayIpAddress!!) - firewallClient.createRule(firewallRule) + // Block UDP traffic to the relay + val firewallRule = DropRule.blockUDPTrafficRule(relayIpAddress!!) + firewallClient.createRule(firewallRule) - on<ConnectPage> { - clickConnect() - // Currently it takes ~45 seconds to connect with wg obfuscation automatic and UDP - // traffic blocked so we need to be very forgiving - waitForConnectedLabel(timeout = VERY_FORGIVING_WIREGUARD_OFF_CONNECTION_TIMEOUT) + on<ConnectPage> { + clickConnect() + // Currently it takes ~45 seconds to connect with wg obfuscation automatic and UDP + // traffic blocked so we need to be very forgiving + waitForConnectedLabel(timeout = VERY_FORGIVING_WIREGUARD_OFF_CONNECTION_TIMEOUT) + } } - } @Test @HasDependencyOnLocalAPI |
