Skip to content

Commit

Permalink
⚡ Use uvloop with pytest anyio backend (#1313)
Browse files Browse the repository at this point in the history
* ⚡ Use uvloop with anyio backend

* 🧪 Increase short sleep to allow records to update
  • Loading branch information
ff137 authored Feb 5, 2025
1 parent 7089586 commit aaa2b67
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
return ("asyncio", {"use_uvloop": True})


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion app/tests/e2e/issuer/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
return ("asyncio", {"use_uvloop": True})
2 changes: 1 addition & 1 deletion app/tests/e2e/issuer/test_save_exchange_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ async def test_get_cred_exchange_records(
},
)

await asyncio.sleep(0.5) # short sleep to allow records to update
await asyncio.sleep(1) # short sleep to allow records to update
faber_records = (await faber_client.get(CREDENTIALS_BASE_PATH)).json()

faber_cred_ex_response = (
Expand Down
2 changes: 1 addition & 1 deletion endorser/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
return ("asyncio", {"use_uvloop": True})


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion shared/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
return ("asyncio", {"use_uvloop": True})
2 changes: 1 addition & 1 deletion trustregistry/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
return ("asyncio", {"use_uvloop": True})
2 changes: 1 addition & 1 deletion waypoint/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
return ("asyncio", {"use_uvloop": True})

0 comments on commit aaa2b67

Please sign in to comment.