diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
index fa4a21410a10023d680abe0bc1400ba22a301ae1..76f33eb96ed3e5b32368da02b555933b46b5a66f 100644
--- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
+++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
@@ -103,10 +103,10 @@ public function testQuickStartCommand() {
     // The progress bar uses STDERR to write messages.
     $this->assertContains('Congratulations, you installed Drupal!', $process->getErrorOutput());
     $this->assertNotFalse($port, "Web server running on port $port");
-    $this->assertContains("127.0.0.1:$port/user/reset/1/", $process->getOutput());
 
     // Give the server a couple of seconds to be ready.
     sleep(2);
+    $this->assertContains("127.0.0.1:$port/user/reset/1/", $process->getOutput());
 
     // Generate a cookie so we can make a request against the installed site.
     include $this->root . '/core/includes/bootstrap.inc';