Skip to content

Commit e533d19

Browse files
committed
test_session: add timeout and xfail to test_run_randomize
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
1 parent 1ed8247 commit e533d19

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

libkirk/tests/test_session.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,21 @@ async def test_run_suite_iterate(self, tmpdir, session, iterate, expect):
317317
report_data = await self.read_report(report)
318318
assert len(report_data["results"]) == expect
319319

320+
@pytest.mark.xfail(reason="May hang on slow CI nodes", strict=False)
320321
async def test_run_randomize(self, tmpdir, session):
321322
"""
322323
Test run method when executing shuffled tests.
323324
"""
324325
num_of_suites = 10
325326

326327
report = str(tmpdir / "report.json")
327-
await session.run(
328-
suites=["suite01"] * num_of_suites, randomize=True, report_path=report
328+
await asyncio.wait_for(
329+
session.run(
330+
suites=["suite01"] * num_of_suites,
331+
randomize=True,
332+
report_path=report,
333+
),
334+
timeout=30,
329335
)
330336

331337
report_data = await self.read_report(report)

0 commit comments

Comments
 (0)