Fix Windows test timeout and restore parallel testing (#2383)

OAuth consent tests were timing out on Windows due to SQLite database
locking when OAuthProxy instances used the default DiskStore without
explicit MemoryStore configuration. Added explicit client_storage=MemoryStore()
to three tests in TestConsentPageServerIcon.

Also restored parallel testing on Windows (--numprocesses auto) which
was previously disabled but is now safe with proper test isolation.
This commit is contained in:
Jeremiah Lowin 2025-11-05 17:25:10 -08:00 committed by GitHub
commit f8b896490e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View file

@ -48,12 +48,7 @@ jobs:
run: uv sync --upgrade
- name: Run tests (excluding integration and client_process)
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
uv run pytest --inline-snapshot=disable tests -m "not integration and not client_process"
else
uv run pytest --inline-snapshot=disable tests -m "not integration and not client_process" --numprocesses auto --maxprocesses 4 --dist worksteal
fi
run: uv run pytest --inline-snapshot=disable tests -m "not integration and not client_process" --numprocesses auto --maxprocesses 4 --dist worksteal
shell: bash
- name: Run client process tests separately

View file

@ -691,6 +691,7 @@ class TestConsentPageServerIcon:
upstream_client_secret="upstream-secret",
token_verifier=verifier,
base_url="https://proxy.example.com",
client_storage=MemoryStore(),
jwt_signing_key="test-secret",
)
@ -763,6 +764,7 @@ class TestConsentPageServerIcon:
upstream_client_secret="upstream-secret",
token_verifier=verifier,
base_url="https://proxy.example.com",
client_storage=MemoryStore(),
jwt_signing_key="test-secret",
)
@ -830,6 +832,7 @@ class TestConsentPageServerIcon:
upstream_client_secret="upstream-secret",
token_verifier=verifier,
base_url="https://proxy.example.com",
client_storage=MemoryStore(),
jwt_signing_key="test-secret",
)