-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-test script rewrite #232
Conversation
I'll dig into this a bit more tomorrow and run the tests but so far loving these changes! |
No worries! Ignore if you see some activity in GH, I'm just taking the opportunity to run some self-tests and scheduling the PC to auto-shutdown in a couple of hours. |
Nice catch, I've limitted the
I was able to run a mass test with all tests at once, so it seems to have solved it. |
It should pass on the 9.6.0-beta.1 sync branch |
Weird I got the same results on that branch @Luc45:
Not sure, could it be due to the PHP version I'm using? |
Perfect that fixed it, thanks @Luc45! |
Background & Motivation
The motivation for this PR came after I wasted a couple of hours while doing the sync with 9.6.0-beta.1. One of the self-tests didn't start, and I only found out about this 2h later. Debugging why it failed was much harder than it should be, because the self-test script would just dispatch 20 tests in parallel, keep them all alive with
--wait
and--json
, where each would poll their own test status individually.This PR greatly simplifies this setup, we dispatch the tests async and collect their test run IDs, then we poll their status ourselves with one request to the newly introduced
get-multiple
endpoint, which takes a comma-separated list of test run IDs.This made it possible to also improve the output, and added extensive logging to all requests to
last-self-test.log
, that gets reset with each self test.What Changed: Before vs. After
Before
Multiple Parallel Processes: We would start many processes, each:
Drawbacks:
After
Asynchronous Dispatch
test_run_id
upfront.Unified Polling Loop
qit get-multiple
for alltest_run_id
s in one go.Snapshot Verification
update
mode).Implementation Details
QitRunner.php
:qit get-multiple
until all have a final result.QITLiveOutput.php
:PhpUnitRunner.php
:Testing instructions