Skip to content

Commit

Permalink
debug: attempt to fix timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Oct 28, 2024
1 parent ba7e699 commit 58a6feb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions siibra/deps/test_spatial_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,21 @@ def slowdown():
# spatial transform often struggles with successive requests
# 1 sec sleep allow the requests to be spread out

@pytest.fixture(scope="session")
def session():
sess = requests.Session()
sess.get(endpoint)
yield sess

@pytest.mark.parametrize("source_space, target_space", perm)
@pytest.mark.timeout(5) # 5 sec timeout
def test_spatial_transform(source_space: str, target_space: str):
resp = requests.post(endpoint, json={
@pytest.mark.timeout(5, func_only=True) # 5 sec timeout
def test_spatial_transform(source_space: str, target_space: str, session):
resp = session.post(endpoint, json={
"source_points": [
[-56.180688,-32,35.406444],
],
"source_space": source_space,
"target_space": target_space,
})
resp.raise_for_status()
resp.json()

0 comments on commit 58a6feb

Please sign in to comment.