Skip to content

Commit 14224c2

Browse files
authored
Tweak Chaos Test Parameters (#357)
To reduce false positive failures
1 parent 8ec7550 commit 14224c2

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

.github/workflows/chaos-test.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ on:
99
jobs:
1010
integration:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
python-version: ['3.13']
16-
12+
timeout-minutes: 60
1713
steps:
1814
- uses: actions/checkout@v4
1915
with:
@@ -23,13 +19,13 @@ jobs:
2319
- name: Setup PDM
2420
uses: pdm-project/setup-pdm@v4
2521
with:
26-
python-version: ${{ matrix.python-version }}
22+
python-version: '3.13'
2723
architecture: 'x64'
2824

2925
- name: Install Dependencies
3026
run: pdm install
3127
working-directory: ./
3228

3329
- name: Run Chaos Tests
34-
run: pdm run pytest --timeout 600 chaos-tests
30+
run: pdm run pytest --timeout 1200 chaos-tests
3531
working-directory: ./

chaos-tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ def __init__(self) -> None:
6262
def start(self) -> None:
6363
def _chaos_thread() -> None:
6464
while not self.stop_event.is_set():
65-
wait_time = random.uniform(5, 20)
65+
wait_time = random.uniform(5, 40)
6666
if not self.stop_event.wait(wait_time):
6767
print(
6868
f"🐒 ChaosMonkey strikes after {wait_time:.2f} seconds! Restarting Postgres..."
6969
)
7070
stop_docker_pg()
71-
down_time = random.uniform(0, 5)
71+
down_time = random.uniform(0, 2)
7272
time.sleep(down_time)
7373
start_docker_pg()
7474

chaos-tests/test_workflows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_recv(dbos: DBOS) -> None:
4242
def recv_workflow() -> Any:
4343
return DBOS.recv(topic, timeout_seconds=10)
4444

45-
num_workflows = 1000
45+
num_workflows = 5000
4646

4747
for i in range(num_workflows):
4848
handle = DBOS.start_workflow(recv_workflow)

0 commit comments

Comments
 (0)