Skip to content

Commit f2c21ce

Browse files
committed
stabilize tests
1 parent 7278c5b commit f2c21ce

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

stac_fastapi/elasticsearch/tests/api/test_api.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@ def test_app_transaction_extension(app_client, load_test_data, es_transactions):
7070
item = load_test_data("test_item.json")
7171
resp = app_client.post(f"/collections/{item['collection']}/items", json=item)
7272
assert resp.status_code == 200
73-
73+
time.sleep(1)
7474
es_transactions.delete_item(
7575
item["id"], item["collection"], request=MockStarletteRequest
7676
)
7777

7878

7979
def test_app_search_response(load_test_data, app_client, es_transactions):
80-
8180
item = load_test_data("test_item.json")
8281
es_transactions.create_item(item, request=MockStarletteRequest)
8382

@@ -161,7 +160,6 @@ def test_app_query_extension_gt(load_test_data, app_client, es_transactions):
161160
)
162161

163162

164-
# @pytest.mark.skip(reason="assert 0 == 1")
165163
def test_app_query_extension_gte(load_test_data, app_client, es_transactions):
166164
test_item = load_test_data("test_item.json")
167165
es_transactions.create_item(test_item, request=MockStarletteRequest)
@@ -273,7 +271,7 @@ def test_search_point_intersects(load_test_data, app_client, es_transactions):
273271
item = load_test_data("test_item.json")
274272
es_transactions.create_item(item, request=MockStarletteRequest)
275273

276-
time.sleep(1)
274+
time.sleep(2)
277275
point = [150.04, -33.14]
278276
intersects = {"type": "Point", "coordinates": point}
279277

@@ -341,7 +339,7 @@ def test_bbox_3d(load_test_data, app_client, es_transactions):
341339
def test_search_line_string_intersects(load_test_data, app_client, es_transactions):
342340
item = load_test_data("test_item.json")
343341
es_transactions.create_item(item, request=MockStarletteRequest)
344-
time.sleep(1)
342+
time.sleep(2)
345343

346344
line = [[150.04, -33.14], [150.22, -33.89]]
347345
intersects = {"type": "LineString", "coordinates": line}

stac_fastapi/elasticsearch/tests/resources/test_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def test_item_search_temporal_window_get(app_client, load_test_data):
566566
)
567567
assert resp.status_code == 200
568568

569-
time.sleep(1)
569+
time.sleep(2)
570570

571571
item_date = rfc3339_str_to_datetime(test_item["properties"]["datetime"])
572572
item_date_before = item_date - timedelta(seconds=1)
@@ -682,7 +682,7 @@ def test_item_search_get_query_extension(app_client, load_test_data):
682682
)
683683
assert resp.status_code == 200
684684

685-
time.sleep(1)
685+
time.sleep(2)
686686

687687
# EPSG is a JSONB key
688688
params = {

0 commit comments

Comments
 (0)