Skip to content

Fix flaky E2E test test_failing_tmt_test_case.cy.js - #313

Merged
pellecchialuigi merged 5 commits into
mainfrom
issue-310
Aug 27, 2026
Merged

Fix flaky E2E test test_failing_tmt_test_case.cy.js#313
pellecchialuigi merged 5 commits into
mainfrom
issue-310

Conversation

@pellecchialuigi

Copy link
Copy Markdown
Collaborator

Fixed e2e test test_failing_tmt_test_case
Extended tmt failing test timeout to 5 minutes

Co-authored by Cursor

Solves issue #310

pellecchialuigi and others added 5 commits August 24, 2026 12:40
… Cursor

Signed-off-by: Luigi Pellecchia <pellecchia.luigi@gmail.com>
Signed-off-by: Luigi Pellecchia <pellecchia.luigi@gmail.com>
Signed-off-by: Luigi Pellecchia <pellecchia.luigi@gmail.com>
The API container has no systemd, so nested guest containers fail with
the default systemd cgroup manager and overlay-on-overlay storage.
Ship cgroupfs/file-events and vfs configs, start the API container with
host cgroup namespace, and patch TMT to drop TTY and disable cgroups.

Signed-off-by: Luigi Pellecchia <pellecchia.luigi@gmail.com>
@pellecchialuigi

Copy link
Copy Markdown
Collaborator Author

What this PR changes

This PR stabilizes the flaky E2E spec test_failing_tmt_test_case.cy.js (issue #310). The Cypress spec was brittle, but CI failures were mainly from nested TMT/Podman inside the API container: guests could not start, and when they failed the runner could not persist the log (NUL bytes from conmon), leaving the run stuck in running.

1. Harden the Cypress E2E spec (5cf753b)

Rewrote test_failing_tmt_test_case.cy.js to be less timing- and selector-sensitive: bind the user-files path from localStorage uId instead of hardcoding user 1; share openTestCaseResults() for navigation; raise suite timeouts (15s) and UI waits (20s); poll for fail up to ~2 minutes; fix cleanup to target the table row. FMF duration for the dummy failing test went from 1m to 5m.

2. Sanitize TMT output before persisting (80647bb)

Conmon can emit \x00 in stderr. PostgreSQL rejects NUL in text columns, so publish() failed and the run stayed running. sanitize_db_text() strips NUL; TestRunner.publish() sanitizes log and report before commit; TMT decodes stdout/stderr with errors="replace". Covered by new tests in api/test/test_testrun_publish.py.

3. Pin TMT default guest images (bbbe401)

Unpinned fedora / debian tags made nested provision flaky. Defaults are now fedora:39 and debian:12.

4. CI timeout for the demo environment (99267c3)

The Run demo environment step has timeout-minutes: 20 so a hung run_demo.sh fails the job instead of consuming the runner.

5. Nested Podman for TMT container provision (5283158)

The API image has no systemd, so nested guests fail with the default systemd cgroup manager and overlay-on-overlay storage. Ship cgroupfs + file events and vfs storage into the API image, start the API container with --cgroupns=host, and patch TMT to drop TTY (-id) and pass --cgroups=disabled.

Together this lets the failing-TMT E2E path provision a guest, persist a real result (including error logs), and wait long enough in Cypress for that result to show up.

@pellecchialuigi pellecchialuigi changed the title Fix flasky E2E test test_failing_tmt_test_case.cy.js Fix flaky E2E test test_failing_tmt_test_case.cy.js Aug 27, 2026
@pellecchialuigi
pellecchialuigi marked this pull request as ready for review August 27, 2026 10:26
@pellecchialuigi
pellecchialuigi merged commit 81f23ff into main Aug 27, 2026
3 of 4 checks passed
@pellecchialuigi
pellecchialuigi deleted the issue-310 branch August 27, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant