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

Command icon 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:

Comments

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes

spokje’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Additional comments looks good.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed 7e5ce0e and pushed to 11.x. Thanks!

  • longwave committed 7e5ce0ea on 11.x
    Issue #3379847 by Spokje: Add comments on why WaitTerminateTestTrait is...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.