Skip to content

Commit 4bd6b54

Browse files
author
Jacob Truman
committed
XENG-8985 Add flaky test decorator to flaky tests
1 parent b28ee48 commit 4bd6b54

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

requirements.txt

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# pip-compile
66
#
7+
--extra-index-url https://artifactory.corp.adobe.com/artifactory/api/pypi/pypi-releng/simple
78

89
annotated-types==0.7.0
910
# via pydantic
@@ -34,7 +35,7 @@ deprecated==1.2.18
3435
# via fabric
3536
docker==7.1.0
3637
# via -r requirements.in
37-
docutils==0.20.1
38+
docutils==0.21.2
3839
# via readme-renderer
3940
fabric==3.2.2
4041
# via -r requirements.in
@@ -50,11 +51,7 @@ id==1.5.0
5051
# via twine
5152
idna==3.10
5253
# via requests
53-
importlib-metadata==8.5.0
54-
# via
55-
# keyring
56-
# twine
57-
importlib-resources==6.4.5
54+
importlib-metadata==8.6.1
5855
# via keyring
5956
invoke==2.2.0
6057
# via fabric
@@ -66,15 +63,15 @@ jaraco-functools==4.1.0
6663
# via keyring
6764
jinja2==3.1.6
6865
# via -r requirements.in
69-
keyring==25.5.0
66+
keyring==25.6.0
7067
# via twine
7168
markdown-it-py==3.0.0
7269
# via rich
73-
markupsafe==2.1.5
70+
markupsafe==3.0.2
7471
# via jinja2
7572
mdurl==0.1.2
7673
# via markdown-it-py
77-
more-itertools==10.5.0
74+
more-itertools==10.6.0
7875
# via
7976
# jaraco-classes
8077
# jaraco-functools
@@ -86,7 +83,7 @@ paramiko==3.5.1
8683
# via
8784
# -r requirements.in
8885
# fabric
89-
portalocker==3.0.0
86+
portalocker==3.1.1
9087
# via -r requirements.in
9188
pycparser==2.22
9289
# via cffi
@@ -102,11 +99,11 @@ pygments==2.19.1
10299
# rich
103100
pynacl==1.5.0
104101
# via paramiko
105-
python-on-whales==0.75.1
102+
python-on-whales==0.76.1
106103
# via -r requirements.in
107104
pyyaml==6.0.2
108105
# via -r requirements.in
109-
readme-renderer==43.0
106+
readme-renderer==44.0
110107
# via twine
111108
requests==2.32.3
112109
# via
@@ -133,12 +130,10 @@ twine==6.1.0
133130
# via -r requirements.in
134131
typing-extensions==4.13.0
135132
# via
136-
# annotated-types
137133
# pydantic
138134
# pydantic-core
139135
# python-on-whales
140-
# rich
141-
urllib3==2.2.3
136+
urllib3==2.3.0
142137
# via
143138
# docker
144139
# requests
@@ -147,7 +142,5 @@ vcsinfo==2.1.110
147142
# via -r requirements.in
148143
wrapt==1.17.2
149144
# via deprecated
150-
zipp==3.20.2
151-
# via
152-
# importlib-metadata
153-
# importlib-resources
145+
zipp==3.21.0
146+
# via importlib-metadata

test_requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pytest-randomly>=3.5.0
33
pytest-retry>=1.7.0
44
pytest-cov>=2.10.1
55
pytest-xdist>=2.4.0
6+
flaky>=3.8.1
67
graphlib-backport>=1.0.3
78
ruff>=0.1.7
89
ruff-lsp>=0.0.45

test_requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55
# pip-compile --output-file=test_requirements.txt test_requirements.in
66
#
7+
--extra-index-url https://artifactory.corp.adobe.com/artifactory/api/pypi/pypi-releng/simple
78

89
attrs==23.1.0
910
# via
@@ -21,6 +22,8 @@ execnet==1.9.0
2122
# via pytest-xdist
2223
filelock==3.13.1
2324
# via virtualenv
25+
flaky==3.8.1
26+
# via -r test_requirements.in
2427
graphlib-backport==1.0.3
2528
# via -r test_requirements.in
2629
identify==2.5.33

tests/test_utils_flock.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def _wait_and_set(event: Event, sleep_seconds: float):
5454
event.set()
5555

5656

57+
@pytest.mark.flaky(retries=3)
5758
def test_flock_acquire1(mock_logger, tmp_path):
5859
try:
5960
fd = None
@@ -68,6 +69,7 @@ def test_flock_acquire1(mock_logger, tmp_path):
6869
release_flock(fd, mock_logger)
6970

7071

72+
@pytest.mark.flaky(retries=3)
7173
def test_flock_exclusive_acquire(mock_logger, tmp_path):
7274
try:
7375
lock_file = str(tmp_path / "mylock.file")
@@ -129,6 +131,7 @@ def test_flock_exclusive_acquire(mock_logger, tmp_path):
129131
release_flock(fd, mock_logger)
130132

131133

134+
@pytest.mark.flaky(retries=3)
132135
def test_flock_release(mock_logger, tmp_path):
133136
fd = None
134137
try:
@@ -155,6 +158,7 @@ def test_flock_release(mock_logger, tmp_path):
155158
release_flock(fd, mock_logger)
156159

157160

161+
@pytest.mark.flaky(retries=3)
158162
def test_flock_acquire_exclusive_timeout(mock_logger, tmp_path):
159163
try:
160164
lock_file = str(tmp_path / "mylock.file")
@@ -242,6 +246,7 @@ def test_flock_acquire_exclusive_timeout(mock_logger, tmp_path):
242246
release_flock(fd, mock_logger)
243247

244248

249+
@pytest.mark.flaky(retries=3)
245250
def test_flock_shared_acquire(mock_logger, tmp_path):
246251
try:
247252
lock_file = str(tmp_path / "mylock.file")

0 commit comments

Comments
 (0)