fix(test/schema): pin xdist_group to prevent multi-server startup, cap workers at 4
Some checks failed
CI / Test (Standard) (3.11) (push) Has been skipped
CI / Test (Live) (3.11) (push) Has been skipped
CI / Merge testing → main (push) Has been skipped
CI / Lint (ruff) (push) Successful in 1m0s
CI / Dependency audit (pip-audit) (push) Failing after 1m2s
CI / SAST (bandit) (push) Successful in 1m11s
CI / Merge dev → testing (push) Has been skipped
Some checks failed
CI / Test (Standard) (3.11) (push) Has been skipped
CI / Test (Live) (3.11) (push) Has been skipped
CI / Merge testing → main (push) Has been skipped
CI / Lint (ruff) (push) Successful in 1m0s
CI / Dependency audit (pip-audit) (push) Failing after 1m2s
CI / SAST (bandit) (push) Successful in 1m11s
CI / Merge dev → testing (push) Has been skipped
This commit is contained in:
@@ -41,6 +41,7 @@ LIVE_PORT = _free_port()
|
||||
LIVE_SERVER_URL = f"http://127.0.0.1:{LIVE_PORT}"
|
||||
TEST_SECRET = "test-secret-for-automated-fuzzing"
|
||||
_QUICK = os.getenv("SCHEMA_QUICK") == "1"
|
||||
pytestmark = pytest.mark.xdist_group("schemathesis")
|
||||
|
||||
import decnet.web.auth
|
||||
decnet.web.auth.SECRET_KEY = TEST_SECRET
|
||||
@@ -145,7 +146,7 @@ schema = st.openapi.from_url(f"{LIVE_SERVER_URL}/openapi.json")
|
||||
@pytest.mark.fuzz
|
||||
@st.pytest.parametrize(api=schema)
|
||||
@settings(
|
||||
max_examples=100 if _QUICK else 3000,
|
||||
max_examples=10 if _QUICK else 100,
|
||||
deadline=None,
|
||||
verbosity=Verbosity.debug,
|
||||
suppress_health_check=[
|
||||
@@ -162,7 +163,7 @@ def test_schema_compliance(case):
|
||||
@pytest.mark.fuzz
|
||||
@st.pytest.parametrize(api=schema)
|
||||
@settings(
|
||||
max_examples=100 if _QUICK else 500,
|
||||
max_examples=50 if _QUICK else 500,
|
||||
deadline=None,
|
||||
verbosity=Verbosity.normal,
|
||||
suppress_health_check=[
|
||||
|
||||
@@ -28,6 +28,7 @@ import os
|
||||
import pytest
|
||||
|
||||
_QUICK = os.getenv("SCHEMA_QUICK") == "1"
|
||||
pytestmark = pytest.mark.xdist_group("schemathesis")
|
||||
import schemathesis as st
|
||||
from hypothesis import HealthCheck, Verbosity, settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user