summaryrefslogtreecommitdiffhomepage
path: root/test/test-runner/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-runner/src')
-rw-r--r--test/test-runner/src/main.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/test-runner/src/main.rs b/test/test-runner/src/main.rs
index d864968bbe..8399e118d3 100644
--- a/test/test-runner/src/main.rs
+++ b/test/test-runner/src/main.rs
@@ -6,7 +6,7 @@ use std::{
path::{Path, PathBuf},
process::Stdio,
sync::Arc,
- time::Duration,
+ time::{Duration, SystemTime},
};
use util::OnDrop;
@@ -171,10 +171,18 @@ impl Service for TestServer {
async fn geoip_lookup(
self,
- _: context::Context,
+ ctx: context::Context,
mullvad_host: String,
) -> Result<test_rpc::AmIMullvad, test_rpc::Error> {
- test_rpc::net::geoip_lookup(mullvad_host).await
+ let timeout = ctx
+ .deadline
+ .duration_since(SystemTime::now())
+ .ok()
+ // account for some time to send the RPC response
+ .and_then(|d| d.checked_sub(Duration::from_millis(500)))
+ .unwrap_or_default();
+
+ test_rpc::net::geoip_lookup(mullvad_host, timeout).await
}
async fn resolve_hostname(