Problem/Motivation
In #3375959: Add a way to delay executions in test runner until terminate event completed in the child site we introduced the Drupal\Tests\WaitTerminateTestTrait, which made waiting on a lock in the existing test http client middleware possible.
This made it possible to remove the sleep(1) introduced in #3295790: Post-response task running (destructable services) are actually blocking; add test coverage and warn for common misconfiguration.
However, we also removed the comments on why those sleeps/locks are needed.
Since it's certainly not trivial reading the code why we are waiting, and a future refactor might negate the wait, let's re-introduce these comments.
Steps to reproduce
Proposed resolution
- Look at the comments removed in #3375959: Add a way to delay executions in test runner until terminate event completed in the child site (here's the commit: https://git.drupalcode.org/project/drupal/-/commit/1debb39) and reintroduce them in this issue.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3379847
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3379847-add-comments-on
changes, plain diff MR !4561
Comments
Comment #2
spokjeComment #4
spokjeComment #5
smustgrave commentedAdditional comments looks good.
Comment #6
longwaveCommitted 7e5ce0e and pushed to 11.x. Thanks!