Skip to content

Commit

Permalink
Address test_quantum_resistant_tunnel flakiness
Browse files Browse the repository at this point in the history
Limit relay selection in
`test_quantum_resistant_tunnel` to reduce flakiness.

Hopefully this should be able to (at least partially) mitigate timeout
related issues.
  • Loading branch information
MarkusPettersson98 committed Nov 12, 2024
1 parent 5b483ea commit 7d6d4e7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/test-manager/src/tests/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,11 @@ pub async fn test_quantum_resistant_tunnel(
_: TestContext,
rpc: ServiceClient,
mut mullvad_client: MullvadProxyClient,
) -> Result<(), Error> {
) -> anyhow::Result<()> {
// NOTE: We have experienced flakiness due to timeout issues if distant relays are selected.
// This is an attempt to try to reduce this type of flakiness.
use helpers::custom_lists::LowLatency;

mullvad_client
.set_quantum_resistant_tunnel(wireguard::QuantumResistantState::Off)
.await
Expand All @@ -459,13 +463,12 @@ pub async fn test_quantum_resistant_tunnel(

log::info!("Setting tunnel protocol to WireGuard");

let relay_settings = RelaySettings::Normal(RelayConstraints {
tunnel_protocol: Constraint::Only(TunnelType::Wireguard),
..Default::default()
});
set_relay_settings(&mut mullvad_client, relay_settings)
.await
.expect("Failed to update relay settings");
let query = RelayQueryBuilder::new()
.wireguard()
.location(LowLatency)
.build();

apply_settings_from_relay_query(&mut mullvad_client, query).await?;

mullvad_client
.set_quantum_resistant_tunnel(wireguard::QuantumResistantState::On)
Expand Down

0 comments on commit 7d6d4e7

Please sign in to comment.