Verified Commit 7e5ce0ea authored by Dave Long's avatar Dave Long
Browse files

Issue #3379847 by Spokje: Add comments on why WaitTerminateTestTrait is used

parent 9f1ef0f4
Loading
Loading
Loading
Loading
+3 −0
Changes for core/modules/jsonapi/tests/src/Functional/NodeTest.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -317,6 +317,9 @@ public function testPatchPath() {
   * {@inheritdoc}
   */
  public function testGetIndividual() {
    // Cacheable normalizations are written after the response is flushed to
    // the client. We use WaitTerminateTestTrait to wait for Drupal to perform
    // its termination work before continuing.
    $this->setWaitForTerminate();

    parent::testGetIndividual();
+3 −0
Changes for core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ class ConfigurableLanguageManagerTest extends BrowserTestBase {
  protected function setUp(): void {
    parent::setUp();

    // The \Drupal\locale\LocaleTranslation service clears caches after the
    // response is flushed to the client. We use WaitTerminateTestTrait to wait
    // for Drupal to perform its termination work before continuing.
    $this->setWaitForTerminate();

    /** @var \Drupal\user\UserInterface $user */
+3 −0
Changes for core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ class LocaleLocaleLookupTest extends BrowserTestBase {
  protected function setUp(): void {
    parent::setUp();

    // The \Drupal\locale\LocaleTranslation service stores localization cache
    // data after the response is flushed to the client. We do not want to race
    // with any string translations that may be saving from the login below.
    $this->setWaitForTerminate();

    // Change the language default object to different values.
+3 −0
Changes for core/modules/path/tests/src/Functional/PathAliasTest.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@ protected function setUp(): void {
    ]);
    $this->drupalLogin($web_user);

    // The \Drupal\path_alias\AliasWhitelist service performs cache clears after
    // Drupal has flushed the response to the client. We use
    // WaitTerminateTestTrait to wait for Drupal to do this before continuing.
    $this->setWaitForTerminate();
  }

+4 −0
Changes for core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -69,6 +69,10 @@ protected function setUp(): void {
    \Drupal::entityTypeManager()->clearCachedDefinitions();

    $this->setupWorkspaceSwitcherBlock();

    // The \Drupal\path_alias\AliasWhitelist service performs cache clears after
    // Drupal has flushed the response to the client. We use
    // WaitTerminateTestTrait to wait for Drupal to do this before continuing.
    $this->setWaitForTerminate();
  }