Skip to content

Commit fec83a5

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

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

requirements.txt

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -34,7 +34,7 @@ deprecated==1.2.18
3434
# via fabric
3535
docker==7.1.0
3636
# via -r requirements.in
37-
docutils==0.20.1
37+
docutils==0.21.2
3838
# via readme-renderer
3939
fabric==3.2.2
4040
# via -r requirements.in
@@ -50,11 +50,7 @@ id==1.5.0
5050
# via twine
5151
idna==3.10
5252
# via requests
53-
importlib-metadata==8.5.0
54-
# via
55-
# keyring
56-
# twine
57-
importlib-resources==6.4.5
53+
importlib-metadata==8.6.1
5854
# via keyring
5955
invoke==2.2.0
6056
# via fabric
@@ -66,15 +62,15 @@ jaraco-functools==4.1.0
6662
# via keyring
6763
jinja2==3.1.6
6864
# via -r requirements.in
69-
keyring==25.5.0
65+
keyring==25.6.0
7066
# via twine
7167
markdown-it-py==3.0.0
7268
# via rich
73-
markupsafe==2.1.5
69+
markupsafe==3.0.2
7470
# via jinja2
7571
mdurl==0.1.2
7672
# via markdown-it-py
77-
more-itertools==10.5.0
73+
more-itertools==10.6.0
7874
# via
7975
# jaraco-classes
8076
# jaraco-functools
@@ -86,7 +82,7 @@ paramiko==3.5.1
8682
# via
8783
# -r requirements.in
8884
# fabric
89-
portalocker==3.0.0
85+
portalocker==3.1.1
9086
# via -r requirements.in
9187
pycparser==2.22
9288
# via cffi
@@ -102,11 +98,11 @@ pygments==2.19.1
10298
# rich
10399
pynacl==1.5.0
104100
# via paramiko
105-
python-on-whales==0.75.1
101+
python-on-whales==0.76.1
106102
# via -r requirements.in
107103
pyyaml==6.0.2
108104
# via -r requirements.in
109-
readme-renderer==43.0
105+
readme-renderer==44.0
110106
# via twine
111107
requests==2.32.3
112108
# via
@@ -133,12 +129,10 @@ twine==6.1.0
133129
# via -r requirements.in
134130
typing-extensions==4.13.0
135131
# via
136-
# annotated-types
137132
# pydantic
138133
# pydantic-core
139134
# python-on-whales
140-
# rich
141-
urllib3==2.2.3
135+
urllib3==2.3.0
142136
# via
143137
# docker
144138
# requests
@@ -147,7 +141,5 @@ vcsinfo==2.1.110
147141
# via -r requirements.in
148142
wrapt==1.17.2
149143
# via deprecated
150-
zipp==3.20.2
151-
# via
152-
# importlib-metadata
153-
# importlib-resources
144+
zipp==3.21.0
145+
# 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ execnet==1.9.0
2121
# via pytest-xdist
2222
filelock==3.13.1
2323
# via virtualenv
24+
flaky==3.8.1
25+
# via -r test_requirements.in
2426
graphlib-backport==1.0.3
2527
# via -r test_requirements.in
2628
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)