Verified Commit 2dad249a authored by Dave Long's avatar Dave Long
Browse files

Issue #3375584 by znerol, longwave, Spokje: [random test failure] Random...

Issue #3375584 by znerol, longwave, Spokje: [random test failure] Random failure in PathWorkspacesTest
parent 92e703a6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -106,6 +106,11 @@ public function testPathAliases() {
    // Publish the workspace and check that the alias can be accessed in Live.
    $stage->publish();
    $this->assertAccessiblePaths([$path]);

    // The \Drupal\path_alias\AliasWhitelist service performs cache clears after
    // Drupal has flushed the response to the client; wait for this to finish.
    sleep(1);

    $this->assertNotEmpty(\Drupal::cache('data')->get('preload-paths:/node/1'));
  }

@@ -147,8 +152,14 @@ public function testPathAliasesUserSwitch() {
    // Publish the workspace and check that the alias can be accessed in Live.
    $this->drupalLogin($this->rootUser);
    $stage->publish();

    $this->drupalLogout();
    $this->assertAccessiblePaths([$path]);

    // The \Drupal\path_alias\AliasWhitelist service performs cache clears after
    // Drupal has flushed the response to the client; wait for this to finish.
    sleep(1);

    $this->assertNotEmpty(\Drupal::cache('data')->get('preload-paths:/node/1'));
  }