-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpytest.ini
More file actions
45 lines (44 loc) · 2.38 KB
/
pytest.ini
File metadata and controls
45 lines (44 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[pytest]
# Parallel execution re-enabled after fixing deadlock issues
# Replaced TRUNCATE CASCADE (AccessExclusiveLock) with DELETE (RowExclusiveLock)
# to allow concurrent SELECT queries during test cleanup
addopts = -n auto --dist worksteal -vv --tb=short --import-mode=prepend
# Per-test wall-clock timeout (pytest-timeout). 180s default: high
# enough that integration tests interacting with jobs / Cloud Run /
# external services have room to run, low enough that a deadlocked
# test (like the stop_consumer-cancel-without-await bug that stalled
# CI for 30+ min) surfaces with a stack trace instead of silently
# stalling the whole job. Tests that legitimately need more
# (multi-minute job round-trips) opt out via
# ``@pytest.mark.timeout(600)``.
timeout = 180
# ``signal`` (SIGALRM) interrupts even C-level / asyncio loop blocks; the
# previous ``thread`` method only raised KeyboardInterrupt in the worker's
# main thread, which an asyncio loop sitting on a never-resolving Future
# (e.g., a fire-and-forget ``asyncio.create_task`` whose coroutine awaits a
# pending callable) would swallow — leaving CI hung for 33+ min until the
# job-level 45min timeout fired. ``signal`` requires the main thread, which
# xdist workers are.
timeout_method = signal
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
asyncio_mode = auto
asyncio_default_fixture_loop_scope = function
pythonpath = . src
markers =
enable_modules: Enable specific DynaStore modules for a test.
enable_extensions: Enable specific DynaStore extensions for a test.
enable_tasks: Enable specific DynaStore tasks for a test.
gcp: Tests requiring GCP authentication/connectivity.
local_only: Tests that should only run on a developer machine (skipped in CI).
idp: Tests requiring a live Identity Provider (Keycloak / OIDC). Skip with -m "not idp".
elasticsearch: Tests requiring a live Elasticsearch instance. Skip with -m "not elasticsearch".
xdist_group: Group tests to run in the same xdist worker (prevents cross-worker state conflicts).
filterwarnings =
# Ignore lark deprecation warnings regarding sre_parse and sre_constants
ignore:module 'sre_parse' is deprecated:DeprecationWarning
ignore:module 'sre_constants' is deprecated:DeprecationWarning
# Ignore geopandas/shapely deprecation warning
ignore:The 'shapely.geos' module is deprecated:DeprecationWarning