diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-08-26 21:40:30 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-08-29 14:38:32 +0200 |
| commit | 31637ab8b58a7e1ab00acdf32d5ee5ddbd08c458 (patch) | |
| tree | 88971e2ce7e8cf0f5dc4d07f19eb17af6e04e10f /test/test-manager | |
| parent | f1d9dd3bf9dab8bd9e08daac7f36980b3c332dfb (diff) | |
| download | mullvadvpn-31637ab8b58a7e1ab00acdf32d5ee5ddbd08c458.tar.xz mullvadvpn-31637ab8b58a7e1ab00acdf32d5ee5ddbd08c458.zip | |
Fix test_split_tunnel
Raw ICMP isn't allowed on all platforms for unprivileged users.
Instead:
* Use SOCK_DGRAM, where possible
* Use 'ping' command, since SOCK_DGRAM isn't allowed on some older
Linux distros.
Diffstat (limited to 'test/test-manager')
| -rw-r--r-- | test/test-manager/src/tests/helpers.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test-manager/src/tests/helpers.rs b/test/test-manager/src/tests/helpers.rs index 4c9da00a16..542cf0c8a4 100644 --- a/test/test-manager/src/tests/helpers.rs +++ b/test/test-manager/src/tests/helpers.rs @@ -44,15 +44,15 @@ pub const THROTTLE_RETRY_DELAY: Duration = Duration::from_secs(120); const CHECKER_FILENAME_WINDOWS: &str = "connection-checker.exe"; const CHECKER_FILENAME_UNIX: &str = "connection-checker"; -const AM_I_MULLVAD_TIMEOUT_MS: u64 = 10000; -const LEAK_TIMEOUT_MS: u64 = 500; +const AM_I_MULLVAD_TIMEOUT_S: u64 = 10; +const LEAK_TIMEOUT_S: u64 = 1; /// Timeout of [ConnCheckerHandle::check_connection]. -const CONN_CHECKER_TIMEOUT: Duration = Duration::from_millis( - AM_I_MULLVAD_TIMEOUT_MS // https://am.i.mullvad.net timeout - + LEAK_TIMEOUT_MS // leak-tcp timeout - + LEAK_TIMEOUT_MS // leak-icmp timeout - + 1000, // plus some extra grace time +const CONN_CHECKER_TIMEOUT: Duration = Duration::from_secs( + AM_I_MULLVAD_TIMEOUT_S // https://am.i.mullvad.net timeout + + LEAK_TIMEOUT_S // leak-tcp timeout + + LEAK_TIMEOUT_S // leak-icmp timeout + + 1, // plus some extra grace time ); #[macro_export] @@ -957,12 +957,12 @@ impl ConnChecker { let mut args = [ "--interactive", "--timeout", - &AM_I_MULLVAD_TIMEOUT_MS.to_string(), + &AM_I_MULLVAD_TIMEOUT_S.to_string(), // try to leak traffic to LEAK_DESTINATION "--leak", &self.leak_destination.to_string(), "--leak-timeout", - &LEAK_TIMEOUT_MS.to_string(), + &LEAK_TIMEOUT_S.to_string(), "--leak-tcp", "--leak-udp", "--leak-icmp", |
