Skip to content

Commit 82c2be7

Browse files
committed
Add flaky tests to test how testing for flaky tests works
1 parent 00708f2 commit 82c2be7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

test_runner/regress/test_flaky.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""Test for detecting new flaky tests"""
2+
3+
import random
4+
5+
6+
def test_flaky1():
7+
assert random.random() > 0.05
8+
9+
10+
def no_test_flaky2():
11+
assert random.random() > 0.05

test_runner/regress/test_setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# Test that pageserver and safekeeper can restart quickly.
1212
# This is a regression test, see https://github.com/neondatabase/neon/issues/2247
1313
def test_fixture_restart(neon_env_builder: NeonEnvBuilder):
14+
import random
15+
16+
assert random.random() > 0.05
1417
env = neon_env_builder.init_start()
1518

1619
for _ in range(3):
@@ -20,3 +23,9 @@ def test_fixture_restart(neon_env_builder: NeonEnvBuilder):
2023
for _ in range(3):
2124
env.safekeepers[0].stop()
2225
env.safekeepers[0].start()
26+
27+
28+
def test_flaky3():
29+
import random
30+
31+
assert random.random() > 0.05

0 commit comments

Comments
 (0)