diff --git a/.github/workflows/pr-python-tests.yml b/.github/workflows/pr-python-tests.yml index 70a28d9953..c673860704 100644 --- a/.github/workflows/pr-python-tests.yml +++ b/.github/workflows/pr-python-tests.yml @@ -43,7 +43,7 @@ jobs: needs: changes if: needs.changes.outputs.python == 'true' # See https://runs-on.com/runners/linux/ - runs-on: [runs-on, runner=2cpu-linux-arm64, "run-id=${{ github.run_id }}-backend-check"] + runs-on: [runs-on, runner=4cpu-linux-arm64, "run-id=${{ github.run_id }}-backend-check"] timeout-minutes: 45 @@ -74,4 +74,4 @@ jobs: - name: Run Tests shell: script -q -e -c "bash --noprofile --norc -eo pipefail {0}" - run: py.test -o junit_family=xunit2 -xv --ff backend/tests/unit + run: py.test -o junit_family=xunit2 -v --ff --maxfail=1 -n auto backend/tests/unit diff --git a/backend/tests/unit/ee/onyx/server/middleware/test_license_enforcement.py b/backend/tests/unit/ee/onyx/server/middleware/test_license_enforcement.py index f07de8da70..e065dcdd1a 100644 --- a/backend/tests/unit/ee/onyx/server/middleware/test_license_enforcement.py +++ b/backend/tests/unit/ee/onyx/server/middleware/test_license_enforcement.py @@ -39,7 +39,10 @@ class TestPathAllowlist: as the source of truth to ensure tests stay in sync with production code. """ - @pytest.mark.parametrize("path", list(LICENSE_ENFORCEMENT_ALLOWED_PREFIXES)) + # Sorted so the parametrization order is deterministic across pytest-xdist + # workers; iterating the frozenset directly varies with per-process hash + # randomization, which makes xdist abort on a collection mismatch. + @pytest.mark.parametrize("path", sorted(LICENSE_ENFORCEMENT_ALLOWED_PREFIXES)) def test_allowed_paths_are_allowed(self, path: str) -> None: """All paths in LICENSE_ENFORCEMENT_ALLOWED_PREFIXES should be allowed.""" assert _is_path_allowed(path) is True