diff --git a/tests/test_graphql_endpoints.py b/tests/test_graphql_endpoints.py index 4c12ecd..71d1990 100644 --- a/tests/test_graphql_endpoints.py +++ b/tests/test_graphql_endpoints.py @@ -587,8 +587,8 @@ class TestNearestEndpoints: hub = hubs[0] query = """ - query NearestOffers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $hubUuid: String) { - nearestOffers(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, hubUuid: $hubUuid) { + query NearestOffers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $hubUuid: String, $limit: Int) { + nearestOffers(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, hubUuid: $hubUuid, limit: $limit) { uuid productUuid productName @@ -606,10 +606,12 @@ class TestNearestEndpoints: 'lon': float(hub['longitude']) if hub['longitude'] else 0.0, 'radius': 10000, 'productUuid': product['uuid'], - 'hubUuid': hub['uuid'] + 'hubUuid': hub['uuid'], + 'limit': 5 # Limit to avoid timeout when calculating routes } - response = requests.post(GEO_URL, json={'query': query, 'variables': variables}) + # Use longer timeout as route calculation takes time + response = requests.post(GEO_URL, json={'query': query, 'variables': variables}, timeout=120) assert response.status_code == 200 data = response.json()