Skip to content

Updated: A demo test whose request gets no answer says whether the demo's server ended, and how - #8

Open
se7enxweb wants to merge 1 commit into
cjw-network:mainfrom
se7enxweb:rs-pr-demo-test-diagnostic
Open

se7enxweb wants to merge 1 commit into
cjw-network:mainfrom
se7enxweb:rs-pr-demo-test-diagnostic

Conversation

@se7enxweb

@se7enxweb se7enxweb commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What fails

On the PHP 8.0 legs, a DemoTest row now and then fails with a bare status 0:

FAIL  DemoTest > RSF03-01 the demo's group "Budgets and pace": ...
      row 14.1: its "See the path" link opens the rules page: expected 200, got 0

The same legs also end with a segfault from time to time (exit 139, in
FeedsTest). From a status 0 alone you cannot tell whether the demo's server
crashed in the same way, ended in some other way, or was still running and
simply gave no answer. The rows that fail are different each time, and it has
not happened locally in repeated runs.

The fix

Test only, in tests/DemoTest.php: when a request in withDemo() gets no
answer (status 0), the helper asks proc_get_status() about the demo's
server. If the server has ended, the test fails with how it ended:

GET /rules?...: no answer, the demo's server ended -- signal 11 (11: PHP crashed)
GET /rules?...: no answer, the demo's server ended -- exit 255

If the server is still running, nothing changes: the caller gets status 0 as
before. Passing runs are not affected.

Tested

The PHP 8.0.30 crashes themselves are described in #9.

…mo's server ended, and how (a signal, 11: PHP crashed, or its exit code), instead of a bare status 0

The PHP 8.0 legs now and then fail on a demo row with "expected 200, got 0"
(not seen on this machine in repeated runs), and a PHP 8.0 leg once ended
with a segfault; the message tells the two apart the next time.

This branch has not been deployed

No deployments
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