diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml index 3196e507822678d6416c0d04f40cc481855d197e..02b2f796fe95455ecc8dd52373ae36017c941137 100644 --- a/.gitlab-ci/pipeline.yml +++ b/.gitlab-ci/pipeline.yml @@ -94,8 +94,8 @@ variables: SE_NODE_OVERRIDE_MAX_SESSIONS: "true" SE_NODE_MAX_SESSIONS: "16" SE_SESSION_RETRY_INTERVAL: "1" - SE_SESSION_REQUEST_TIMEOUT: "10" - SE_START_XVFB: "false" + SE_SESSION_REQUEST_TIMEOUT: "60" + SE_START_XVFB: "true" SE_START_VNC: "false" .run-tests: &run-tests diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php index ea7d7bb8dde2d8e4233e008d02d018cdcbd60b16..627e24f317c923ee25b20aebe5ff4a73c96ba0b5 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php @@ -4,7 +4,6 @@ namespace Drupal\FunctionalJavascriptTests; -use Behat\Mink\Exception\DriverException; use Drupal\Component\Utility\UrlHelper; use Drupal\Tests\BrowserTestBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -60,16 +59,12 @@ protected function initMink() { try { return parent::initMink(); } - catch (DriverException $e) { - if ($this->minkDefaultDriverClass === DrupalSelenium2Driver::class) { - $this->markTestSkipped("The test wasn't able to connect to your webdriver instance. For more information read core/tests/README.md.\n\nThe original message while starting Mink: {$e->getMessage()}"); - } - else { - throw $e; - } - } catch (\Exception $e) { - $this->markTestSkipped('An unexpected error occurred while starting Mink: ' . $e->getMessage()); + // If it's not possible to get a mink connection ensure that mink's own + // destructor is called immediately, to avoid it being called in + // ::tearDown(), then rethrow the exception. + $this->mink = NULL; + throw $e; } }