From e90ee86effc4b519fd3614e8df74abedc476f216 Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:00:34 +0100
Subject: [PATCH 01/38] debug skipped tests

---
 .../src/FunctionalJavascript/StandardPerformanceTest.php     | 2 +-
 core/scripts/run-tests.sh                                    | 5 +++++
 .../Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php   | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index c425f516695e..cdc5e0d837f2 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -126,7 +126,7 @@ protected function testAnonymous(): void {
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
     $expected = [
-      'QueryCount' => 36,
+      'QueryCount' => 35,
       'CacheGetCount' => 122,
       'CacheSetCount' => 45,
       'CacheDeleteCount' => 0,
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 04e1f2c05258..d1a77808137d 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -913,6 +913,11 @@ function simpletest_script_command(TestRun $test_run, string $test_class): array
       $command[] = '--' . $arg;
     }
   }
+
+  $command[] = '--display-skipped';
+  $command[] = '--stop-on-skipped';
+
+
   // --execute-test and class name needs to come last.
   $command[] = '--execute-test';
   $command[] = $test_class;
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
index cc81d142d453..7d17c65d72f4 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
@@ -30,6 +30,8 @@ public function testAjaxCommands(): void {
     $session = $this->getSession();
     $page = $this->getSession()->getPage();
 
+    $this->assertEquals('yes', 'no');
+
     $form_path = 'ajax_forms_test_ajax_commands_form';
     $web_user = $this->drupalCreateUser(['access content']);
     $this->drupalLogin($web_user);
-- 
GitLab


From bfeb2684e7082251b4dce1b6829d91f389d1f214 Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:04:32 +0100
Subject: [PATCH 02/38] fail on skipped

---
 core/scripts/run-tests.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index d1a77808137d..f25bb01e14a3 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -914,8 +914,7 @@ function simpletest_script_command(TestRun $test_run, string $test_class): array
     }
   }
 
-  $command[] = '--display-skipped';
-  $command[] = '--stop-on-skipped';
+  $command[] = '--fail-on-skipped';
 
 
   // --execute-test and class name needs to come last.
-- 
GitLab


From 0ba3c4b81caa9a12f59723cb3441b870eef612bf Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:05:53 +0100
Subject: [PATCH 03/38] don't allow mink init to fail

---
 core/scripts/run-tests.sh                                   | 2 +-
 .../Drupal/FunctionalJavascriptTests/WebDriverTestBase.php  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index f25bb01e14a3..f556aa9d038c 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -914,7 +914,7 @@ function simpletest_script_command(TestRun $test_run, string $test_class): array
     }
   }
 
-  $command[] = '--fail-on-skipped';
+  // $command[] = '--fail-on-skipped';
 
 
   // --execute-test and class name needs to come last.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index ea7d7bb8dde2..86ec82707262 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
@@ -57,9 +57,9 @@ protected function initMink() {
     }
     $this->minkDefaultDriverArgs = ['chrome', ['goog:chromeOptions' => ['w3c' => FALSE]], 'http://localhost:4444'];
 
-    try {
+    //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()}");
@@ -70,7 +70,7 @@ protected function initMink() {
     }
     catch (\Exception $e) {
       $this->markTestSkipped('An unexpected error occurred while starting Mink: ' . $e->getMessage());
-    }
+    }*/
   }
 
   /**
-- 
GitLab


From 3c9940e73543d66634c46be7d2f074ac5aedd877 Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:07:20 +0100
Subject: [PATCH 04/38] phpcs

---
 .../WebDriverTestBase.php                         | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index 86ec82707262..c34a65cb9875 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
@@ -57,20 +57,7 @@ protected function initMink() {
     }
     $this->minkDefaultDriverArgs = ['chrome', ['goog:chromeOptions' => ['w3c' => FALSE]], 'http://localhost:4444'];
 
-    //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());
-    }*/
+    return parent::initMink();
   }
 
   /**
-- 
GitLab


From 42d469ef047641d29f456aea4bab938f2b936c23 Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:10:43 +0100
Subject: [PATCH 05/38] more phpcs

---
 .../tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php | 1 -
 1 file changed, 1 deletion(-)

diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index c34a65cb9875..127887f89681 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;
-- 
GitLab


From 79f6a519e1780a1106fde8ccaed182a9466dfcd2 Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:26:27 +0100
Subject: [PATCH 06/38] unset mink to skip tearDown()

---
 .../FunctionalJavascriptTests/WebDriverTestBase.php       | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index 127887f89681..8fac5791f36e 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
@@ -56,7 +56,13 @@ protected function initMink() {
     }
     $this->minkDefaultDriverArgs = ['chrome', ['goog:chromeOptions' => ['w3c' => FALSE]], 'http://localhost:4444'];
 
-    return parent::initMink();
+    try {
+      return parent::initMink();
+    }
+    catch (\Exception $e) {
+      $this->mink = NULL;
+      throw $e;
+    }
   }
 
   /**
-- 
GitLab


From 5fe6cb0e88b9c5792f3a8f6912d13f2a60672529 Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Sat, 25 Jan 2025 12:42:14 +0100
Subject: [PATCH 07/38] try lower concurrency

---
 .gitlab-ci/pipeline.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 3196e5078226..3468535e6ecb 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -138,10 +138,10 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 3
+  parallel: 4
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
-    CONCURRENCY: 5
+    CONCURRENCY: 3
     KUBERNETES_CPU_REQUEST: "16"
   services:
     - <<: *with-database
-- 
GitLab


From b9d6e0ab5dc3ec29bf4228eaf3717486bb41e2fa Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <5019-berdir@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 11:55:08 +0000
Subject: [PATCH 08/38] Edit pipeline.yml

---
 .gitlab-ci/pipeline.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 3468535e6ecb..49f37f85aa5b 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -138,10 +138,10 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 4
+  parallel: 8
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
-    CONCURRENCY: 3
+    CONCURRENCY: 1
     KUBERNETES_CPU_REQUEST: "16"
   services:
     - <<: *with-database
-- 
GitLab


From 025fc59550f087e17c389d0aa77f44f2ec0921e0 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 15:17:05 +0000
Subject: [PATCH 09/38] Try increasing maximum sessions.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 49f37f85aa5b..5d59463a0e29 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -92,7 +92,7 @@ variables:
   variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
-    SE_NODE_MAX_SESSIONS: "16"
+    SE_NODE_MAX_SESSIONS: "32"
     SE_SESSION_RETRY_INTERVAL: "1"
     SE_SESSION_REQUEST_TIMEOUT: "10"
     SE_START_XVFB: "false"
-- 
GitLab


From ab7138c5a6b598e0c9aefc74072e2596442ea557 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 15:35:12 +0000
Subject: [PATCH 10/38] Increase timeout to 30

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 5d59463a0e29..3972596f3aa5 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -94,7 +94,7 @@ variables:
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "32"
     SE_SESSION_RETRY_INTERVAL: "1"
-    SE_SESSION_REQUEST_TIMEOUT: "10"
+    SE_SESSION_REQUEST_TIMEOUT: "30"
     SE_START_XVFB: "false"
     SE_START_VNC: "false"
 
-- 
GitLab


From a6e70ef8bb71bc8068283dd4c0f482c24b37c4fc Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 16:03:38 +0000
Subject: [PATCH 11/38] Higher CPU request.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 3972596f3aa5..81af826bd403 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -142,7 +142,7 @@ variables:
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
     CONCURRENCY: 1
-    KUBERNETES_CPU_REQUEST: "16"
+    KUBERNETES_CPU_REQUEST: "32"
   services:
     - <<: *with-database
     - <<: *with-selenium-chrome
-- 
GitLab


From 954d6181452ace8e16481adbfc1c49b575cdd96c Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 16:18:27 +0000
Subject: [PATCH 12/38] 30

---
 .gitlab-ci/pipeline.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 81af826bd403..c68cef24df89 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -92,7 +92,7 @@ variables:
   variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
-    SE_NODE_MAX_SESSIONS: "32"
+    SE_NODE_MAX_SESSIONS: "30"
     SE_SESSION_RETRY_INTERVAL: "1"
     SE_SESSION_REQUEST_TIMEOUT: "30"
     SE_START_XVFB: "false"
@@ -142,7 +142,7 @@ variables:
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
     CONCURRENCY: 1
-    KUBERNETES_CPU_REQUEST: "32"
+    KUBERNETES_CPU_REQUEST: "30"
   services:
     - <<: *with-database
     - <<: *with-selenium-chrome
-- 
GitLab


From ec2c1dc4a3cbb69331842c9e9d8a4c71bb09d5c5 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 16:29:36 +0000
Subject: [PATCH 13/38] Try concurrency 2.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index c68cef24df89..fb03da9fa1ca 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -141,7 +141,7 @@ variables:
   parallel: 8
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
-    CONCURRENCY: 1
+    CONCURRENCY: 2
     KUBERNETES_CPU_REQUEST: "30"
   services:
     - <<: *with-database
-- 
GitLab


From 6da8202704171aae1168617f34cc66d826fae348 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 16:40:27 +0000
Subject: [PATCH 14/38] Try reset instead of stop.

---
 core/tests/Drupal/Tests/BrowserTestBase.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index dbad4cecb5f7..4e3d12898f26 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -426,7 +426,7 @@ protected function tearDown(): void {
     // Close any mink sessions as early as possible to free a new browser
     // session up for the next test method or test.
     if ($this->mink) {
-      $this->mink->stopSessions();
+      $this->mink->resetSessions();
     }
     parent::tearDown();
 
-- 
GitLab


From 45297b592be1f9fd510268941b89f8a91632b510 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 17:22:25 +0000
Subject: [PATCH 15/38] Try no reset at all, let mink __destruct() do it.

---
 .gitlab-ci/pipeline.yml                     | 2 +-
 core/tests/Drupal/Tests/BrowserTestBase.php | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index fb03da9fa1ca..2ffefe84210b 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -138,7 +138,7 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 8
+  parallel: 16
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
     CONCURRENCY: 2
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 4e3d12898f26..1f71c5f437b0 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -423,11 +423,6 @@ protected function cleanupEnvironment() {
    * {@inheritdoc}
    */
   protected function tearDown(): void {
-    // Close any mink sessions as early as possible to free a new browser
-    // session up for the next test method or test.
-    if ($this->mink) {
-      $this->mink->resetSessions();
-    }
     parent::tearDown();
 
     if ($this->container) {
-- 
GitLab


From cc6d19f2b9e184b0aac54ba2c7348a674ac4734c Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 17:30:33 +0000
Subject: [PATCH 16/38] Even more parallel jobs.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 2ffefe84210b..7b3373e991c0 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -138,7 +138,7 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 16
+  parallel: 32
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
     CONCURRENCY: 2
-- 
GitLab


From 24bc5eb886e7cfb026cd8a5f931443f1ba6140f2 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 17:40:50 +0000
Subject: [PATCH 17/38] Restore

---
 core/tests/Drupal/Tests/BrowserTestBase.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 1f71c5f437b0..dbad4cecb5f7 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -423,6 +423,11 @@ protected function cleanupEnvironment() {
    * {@inheritdoc}
    */
   protected function tearDown(): void {
+    // Close any mink sessions as early as possible to free a new browser
+    // session up for the next test method or test.
+    if ($this->mink) {
+      $this->mink->stopSessions();
+    }
     parent::tearDown();
 
     if ($this->container) {
-- 
GitLab


From a2fcbca3c00be146a25b56c3e871f1f18ba5ad29 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 18:20:32 +0000
Subject: [PATCH 18/38] Try setting SE_NODE_SESSION_TIMEOUT

---
 .gitlab-ci/pipeline.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 7b3373e991c0..904e341cb005 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -93,6 +93,7 @@ variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "30"
+    SE_NODE_SESSION_TIMEOUT: "4"
     SE_SESSION_RETRY_INTERVAL: "1"
     SE_SESSION_REQUEST_TIMEOUT: "30"
     SE_START_XVFB: "false"
-- 
GitLab


From df284f20e09799c50e7c6369732d4bb1d032b1db Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 18:28:16 +0000
Subject: [PATCH 19/38] Try a ridiculous amount of parallel jobs.

---
 .gitlab-ci/pipeline.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 904e341cb005..b175c2612803 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -139,11 +139,11 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 32
+  parallel: 64
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
-    CONCURRENCY: 2
-    KUBERNETES_CPU_REQUEST: "30"
+    CONCURRENCY: 1
+    KUBERNETES_CPU_REQUEST: "4"
   services:
     - <<: *with-database
     - <<: *with-selenium-chrome
-- 
GitLab


From f58d8610deb646f65d035efbc73e0991e90c3f9a Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 18:34:45 +0000
Subject: [PATCH 20/38] Set a longer timeout.

---
 .gitlab-ci/pipeline.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index b175c2612803..afb3960ad0e6 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: "30"
     SE_NODE_SESSION_TIMEOUT: "4"
-    SE_SESSION_RETRY_INTERVAL: "1"
-    SE_SESSION_REQUEST_TIMEOUT: "30"
+    SE_SESSION_RETRY_INTERVAL: "2"
+    SE_SESSION_REQUEST_TIMEOUT: "180"
     SE_START_XVFB: "false"
     SE_START_VNC: "false"
 
-- 
GitLab


From 293143a30532cd8d9ead44c196dbea34b7ba03be Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 18:43:01 +0000
Subject: [PATCH 21/38] Set a higher node session timeout.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index afb3960ad0e6..89bde144bb17 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -93,7 +93,7 @@ variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "30"
-    SE_NODE_SESSION_TIMEOUT: "4"
+    SE_NODE_SESSION_TIMEOUT: "15"
     SE_SESSION_RETRY_INTERVAL: "2"
     SE_SESSION_REQUEST_TIMEOUT: "180"
     SE_START_XVFB: "false"
-- 
GitLab


From 05a3b239eff11ab345074778f1aa910a7724732c Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 18:53:19 +0000
Subject: [PATCH 22/38] Set node session timeout to 30.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 89bde144bb17..e0ce0c5b4591 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -93,7 +93,7 @@ variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "30"
-    SE_NODE_SESSION_TIMEOUT: "15"
+    SE_NODE_SESSION_TIMEOUT: "30"
     SE_SESSION_RETRY_INTERVAL: "2"
     SE_SESSION_REQUEST_TIMEOUT: "180"
     SE_START_XVFB: "false"
-- 
GitLab


From 362367f3f1977fa750654f6379dcbc8c2264cb65 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 19:00:54 +0000
Subject: [PATCH 23/38] Completely remove the timeout override.

---
 .gitlab-ci/pipeline.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index e0ce0c5b4591..cb7d3dc882b8 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -95,7 +95,6 @@ variables:
     SE_NODE_MAX_SESSIONS: "30"
     SE_NODE_SESSION_TIMEOUT: "30"
     SE_SESSION_RETRY_INTERVAL: "2"
-    SE_SESSION_REQUEST_TIMEOUT: "180"
     SE_START_XVFB: "false"
     SE_START_VNC: "false"
 
-- 
GitLab


From 429b455ceab901b104db0c2d0d10de6a7e063122 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 19:09:52 +0000
Subject: [PATCH 24/38] Retry interval to 1.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index cb7d3dc882b8..c8d9c5963729 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -94,7 +94,7 @@ variables:
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "30"
     SE_NODE_SESSION_TIMEOUT: "30"
-    SE_SESSION_RETRY_INTERVAL: "2"
+    SE_SESSION_RETRY_INTERVAL: "1"
     SE_START_XVFB: "false"
     SE_START_VNC: "false"
 
-- 
GitLab


From 7c280c27ae4f5285fd8a5c6cf2a1ae78d9cd41f7 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sat, 25 Jan 2025 19:26:47 +0000
Subject: [PATCH 25/38] Remove node session timeout override.

---
 .gitlab-ci/pipeline.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index c8d9c5963729..cb83ad370152 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -93,7 +93,6 @@ variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "30"
-    SE_NODE_SESSION_TIMEOUT: "30"
     SE_SESSION_RETRY_INTERVAL: "1"
     SE_START_XVFB: "false"
     SE_START_VNC: "false"
-- 
GitLab


From 7e90a543a509f93e5a1414eb06e681d45bba7b93 Mon Sep 17 00:00:00 2001
From: Dave Long <dave@longwaveconsulting.com>
Date: Sat, 25 Jan 2025 21:33:02 +0000
Subject: [PATCH 26/38] Enable additional logging.

---
 .gitlab-ci/pipeline.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index cb83ad370152..1d14b0faa495 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -57,6 +57,7 @@ default:
       job: '📔 Spell-checking'
 
 variables:
+  CI_DEBUG_SERVICES: "true"
   FF_NETWORK_PER_BUILD: 1
   SIMPLETEST_BASE_URL: http://localhost/subdirectory
   DB_DRIVER: mysql
-- 
GitLab


From a46314ebd87b768eeec7c6ed70a2c816214ae46a Mon Sep 17 00:00:00 2001
From: Dave Long <dave@longwaveconsulting.com>
Date: Sun, 26 Jan 2025 10:17:52 +0000
Subject: [PATCH 27/38] Increase logging.

---
 .gitlab-ci/pipeline.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 1d14b0faa495..931aa5688b6d 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -97,6 +97,7 @@ variables:
     SE_SESSION_RETRY_INTERVAL: "1"
     SE_START_XVFB: "false"
     SE_START_VNC: "false"
+    SE_OPTS: "--log-level FINE"
 
 .run-tests: &run-tests
   script:
-- 
GitLab


From 9aa6f62bdd7cef5b0c1cf02447e59928212142b7 Mon Sep 17 00:00:00 2001
From: Dave Long <dave@longwaveconsulting.com>
Date: Sun, 26 Jan 2025 10:18:01 +0000
Subject: [PATCH 28/38] Bump Chrome version.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 931aa5688b6d..1e69152090f2 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -88,7 +88,7 @@ variables:
     - "--allowed-origins=*"
 
 .with-selenium-chrome: &with-selenium-chrome
-  name: selenium/standalone-chrome:127.0
+  name: selenium/standalone-chrome:132.0
   alias: selenium
   variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
-- 
GitLab


From 84fe56603ad0ec57f996e888324a349928640197 Mon Sep 17 00:00:00 2001
From: Dave Long <24510-longwave@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 10:36:30 +0000
Subject: [PATCH 29/38] Try enabling xvfb

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 1e69152090f2..39699b5d24c4 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -95,7 +95,7 @@ variables:
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "30"
     SE_SESSION_RETRY_INTERVAL: "1"
-    SE_START_XVFB: "false"
+    SE_START_XVFB: "true"
     SE_START_VNC: "false"
     SE_OPTS: "--log-level FINE"
 
-- 
GitLab


From e9ade023e7ce888094b69a7eefb30267a9ed7114 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 10:51:17 +0000
Subject: [PATCH 30/38] Put resources back to a reasonable amount.

---
 .gitlab-ci/pipeline.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 39699b5d24c4..7b6bbddd0605 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -93,7 +93,7 @@ variables:
   variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
-    SE_NODE_MAX_SESSIONS: "30"
+    SE_NODE_MAX_SESSIONS: "16"
     SE_SESSION_RETRY_INTERVAL: "1"
     SE_START_XVFB: "true"
     SE_START_VNC: "false"
@@ -139,11 +139,11 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 64
+  parallel: 5
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
-    CONCURRENCY: 1
-    KUBERNETES_CPU_REQUEST: "4"
+    CONCURRENCY: 5
+    KUBERNETES_CPU_REQUEST: "16"
   services:
     - <<: *with-database
     - <<: *with-selenium-chrome
-- 
GitLab


From 1dbf6ccf36d813a7ee80b020f0fe2718182e3d6a Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 10:59:07 +0000
Subject: [PATCH 31/38] Revert debug changes.

---
 .gitlab-ci/pipeline.yml                       |  5 +-
 .../StandardPerformanceTest.php               | 93 ++++++++-----------
 core/scripts/run-tests.sh                     |  6 +-
 .../Ajax/CommandsTest.php                     |  2 -
 4 files changed, 42 insertions(+), 64 deletions(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 7b6bbddd0605..3af38ca141ac 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -57,7 +57,6 @@ default:
       job: '📔 Spell-checking'
 
 variables:
-  CI_DEBUG_SERVICES: "true"
   FF_NETWORK_PER_BUILD: 1
   SIMPLETEST_BASE_URL: http://localhost/subdirectory
   DB_DRIVER: mysql
@@ -88,16 +87,16 @@ variables:
     - "--allowed-origins=*"
 
 .with-selenium-chrome: &with-selenium-chrome
-  name: selenium/standalone-chrome:132.0
+  name: selenium/standalone-chrome:127.0
   alias: selenium
   variables:
     JAVA_OPTS: "-Dwebdriver.chrome.logfile=/builds/chromedriver.log"
     SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
     SE_NODE_MAX_SESSIONS: "16"
     SE_SESSION_RETRY_INTERVAL: "1"
+    SE_SESSION_REQUEST_TIMEOUT: "60"
     SE_START_XVFB: "true"
     SE_START_VNC: "false"
-    SE_OPTS: "--log-level FINE"
 
 .run-tests: &run-tests
   script:
diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index cdc5e0d837f2..897b59bb0027 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -84,6 +84,8 @@ protected function testAnonymous(): void {
       $this->drupalGet('');
     }, 'standardFrontPage');
     $this->assertNoJavaScript($performance_data);
+    $this->assertSame(1, $performance_data->getStylesheetCount());
+    $this->assertLessThan(3500, $performance_data->getStylesheetBytes());
 
     $expected_queries = [
       'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."alias" LIKE "/node" ESCAPE ' . "'\\\\'" . ') AND ("base_table"."langcode" IN ("en", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
@@ -125,24 +127,21 @@ protected function testAnonymous(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $expected = [
-      'QueryCount' => 35,
-      'CacheGetCount' => 122,
-      'CacheSetCount' => 45,
-      'CacheDeleteCount' => 0,
-      'CacheTagChecksumCount' => 37,
-      'CacheTagIsValidCount' => 43,
-      'CacheTagInvalidationCount' => 0,
-      'StylesheetCount' => 1,
-      'StylesheetBytes' => 3450,
-    ];
-    $this->assertMetrics($expected, $performance_data);
+    $this->assertSame(36, $performance_data->getQueryCount());
+    $this->assertSame(123, $performance_data->getCacheGetCount());
+    $this->assertSame(45, $performance_data->getCacheSetCount());
+    $this->assertSame(0, $performance_data->getCacheDeleteCount());
+    $this->assertSame(37, $performance_data->getCacheTagChecksumCount());
+    $this->assertSame(43, $performance_data->getCacheTagIsValidCount());
+    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
 
     // Test node page.
     $performance_data = $this->collectPerformanceData(function () {
       $this->drupalGet('node/1');
     }, 'standardNodePage');
     $this->assertNoJavaScript($performance_data);
+    $this->assertSame(1, $performance_data->getStylesheetCount());
+    $this->assertLessThan(3500, $performance_data->getStylesheetBytes());
 
     $expected_queries = [
       'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."alias" LIKE "/node/1" ESCAPE ' . "'\\\\'" . ') AND ("base_table"."langcode" IN ("en", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
@@ -158,18 +157,13 @@ protected function testAnonymous(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
+    $this->assertSame(10, $performance_data->getQueryCount());
+    $this->assertSame(93, $performance_data->getCacheGetCount());
+    $this->assertSame(16, $performance_data->getCacheSetCount());
+    $this->assertSame(0, $performance_data->getCacheDeleteCount());
     $this->assertCountBetween(24, 25, $performance_data->getCacheTagChecksumCount());
     $this->assertCountBetween(39, 40, $performance_data->getCacheTagIsValidCount());
-    $expected = [
-      'QueryCount' => 10,
-      'CacheGetCount' => 92,
-      'CacheSetCount' => 16,
-      'CacheDeleteCount' => 0,
-      'CacheTagInvalidationCount' => 0,
-      'StylesheetCount' => 1,
-      'StylesheetBytes' => 3150,
-    ];
-    $this->assertMetrics($expected, $performance_data);
+    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
 
     // Test user profile page.
     $this->user = $this->drupalCreateUser();
@@ -177,6 +171,8 @@ protected function testAnonymous(): void {
       $this->drupalGet('user/' . $this->user->id());
     }, 'standardUserPage');
     $this->assertNoJavaScript($performance_data);
+    $this->assertSame(1, $performance_data->getStylesheetCount());
+    $this->assertLessThan(3500, $performance_data->getStylesheetBytes());
 
     $expected_queries = [
       'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."alias" LIKE "/user/2" ESCAPE ' . "'\\\\'" . ') AND ("base_table"."langcode" IN ("en", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
@@ -196,18 +192,13 @@ protected function testAnonymous(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $expected = [
-      'QueryCount' => 14,
-      'CacheGetCount' => 77,
-      'CacheSetCount' => 17,
-      'CacheDeleteCount' => 0,
-      'CacheTagChecksumCount' => 23,
-      'CacheTagIsValidCount' => 32,
-      'CacheTagInvalidationCount' => 0,
-      'StylesheetCount' => 1,
-      'StylesheetBytes' => 3150,
-    ];
-    $this->assertMetrics($expected, $performance_data);
+    $this->assertSame(14, $performance_data->getQueryCount());
+    $this->assertSame(78, $performance_data->getCacheGetCount());
+    $this->assertSame(17, $performance_data->getCacheSetCount());
+    $this->assertSame(0, $performance_data->getCacheDeleteCount());
+    $this->assertSame(23, $performance_data->getCacheTagChecksumCount());
+    $this->assertSame(32, $performance_data->getCacheTagIsValidCount());
+    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
   }
 
   /**
@@ -252,16 +243,13 @@ protected function testLogin(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $expected = [
-      'QueryCount' => 17,
-      'CacheGetCount' => 82,
-      'CacheSetCount' => 1,
-      'CacheDeleteCount' => 1,
-      'CacheTagChecksumCount' => 1,
-      'CacheTagIsValidCount' => 37,
-      'CacheTagInvalidationCount' => 0,
-    ];
-    $this->assertMetrics($expected, $performance_data);
+    $this->assertSame(17, $performance_data->getQueryCount());
+    $this->assertSame(84, $performance_data->getCacheGetCount());
+    $this->assertSame(1, $performance_data->getCacheSetCount());
+    $this->assertSame(1, $performance_data->getCacheDeleteCount());
+    $this->assertSame(1, $performance_data->getCacheTagChecksumCount());
+    $this->assertSame(37, $performance_data->getCacheTagIsValidCount());
+    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
     $this->drupalLogout();
   }
 
@@ -309,16 +297,13 @@ protected function testLoginBlock(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $expected = [
-      'QueryCount' => 18,
-      'CacheGetCount' => 103,
-      'CacheSetCount' => 1,
-      'CacheDeleteCount' => 1,
-      'CacheTagChecksumCount' => 1,
-      'CacheTagIsValidCount' => 43,
-      'CacheTagInvalidationCount' => 0,
-    ];
-    $this->assertMetrics($expected, $performance_data);
+    $this->assertSame(18, $performance_data->getQueryCount());
+    $this->assertSame(105, $performance_data->getCacheGetCount());
+    $this->assertSame(1, $performance_data->getCacheSetCount());
+    $this->assertSame(1, $performance_data->getCacheDeleteCount());
+    $this->assertSame(1, $performance_data->getCacheTagChecksumCount());
+    $this->assertSame(43, $performance_data->getCacheTagIsValidCount());
+    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
   }
 
   /**
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index f556aa9d038c..9e6fd1f4cf0c 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -913,10 +913,6 @@ function simpletest_script_command(TestRun $test_run, string $test_class): array
       $command[] = '--' . $arg;
     }
   }
-
-  // $command[] = '--fail-on-skipped';
-
-
   // --execute-test and class name needs to come last.
   $command[] = '--execute-test';
   $command[] = $test_class;
@@ -1267,7 +1263,7 @@ function simpletest_script_reporter_write_xml_results(TestRunResultsStorageInter
         }
         $test_class = $result->test_class;
         if (!isset($xml_files[$test_class])) {
-          $doc = new DOMDocument('1.0', 'utf-8');
+          $doc = new DOMDocument('1.0');
           $root = $doc->createElement('testsuite');
           $root = $doc->appendChild($root);
           $xml_files[$test_class] = ['doc' => $doc, 'suite' => $root];
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
index 7d17c65d72f4..cc81d142d453 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php
@@ -30,8 +30,6 @@ public function testAjaxCommands(): void {
     $session = $this->getSession();
     $page = $this->getSession()->getPage();
 
-    $this->assertEquals('yes', 'no');
-
     $form_path = 'ajax_forms_test_ajax_commands_form';
     $web_user = $this->drupalCreateUser(['access content']);
     $this->drupalLogin($web_user);
-- 
GitLab


From 5ee34828c49d2d31df1698975e6727094584de92 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 11:16:50 +0000
Subject: [PATCH 32/38] Update assertion.

---
 .../tests/src/FunctionalJavascript/StandardPerformanceTest.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index 897b59bb0027..8d8dc6121826 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -128,7 +128,7 @@ protected function testAnonymous(): void {
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
     $this->assertSame(36, $performance_data->getQueryCount());
-    $this->assertSame(123, $performance_data->getCacheGetCount());
+    $this->assertSame(122, $performance_data->getCacheGetCount());
     $this->assertSame(45, $performance_data->getCacheSetCount());
     $this->assertSame(0, $performance_data->getCacheDeleteCount());
     $this->assertSame(37, $performance_data->getCacheTagChecksumCount());
-- 
GitLab


From 27dd4ea4ddd93b229157f0068aeb084c1deae097 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 11:27:01 +0000
Subject: [PATCH 33/38] Reduce cache get count.

---
 .../tests/src/FunctionalJavascript/StandardPerformanceTest.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index 8d8dc6121826..6953efb09eda 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -158,7 +158,7 @@ protected function testAnonymous(): void {
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
     $this->assertSame(10, $performance_data->getQueryCount());
-    $this->assertSame(93, $performance_data->getCacheGetCount());
+    $this->assertSame(92, $performance_data->getCacheGetCount());
     $this->assertSame(16, $performance_data->getCacheSetCount());
     $this->assertSame(0, $performance_data->getCacheDeleteCount());
     $this->assertCountBetween(24, 25, $performance_data->getCacheTagChecksumCount());
-- 
GitLab


From 1d79ca171f8a61ac14e4fc2ebc04d5b397037861 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 12:19:41 +0000
Subject: [PATCH 34/38] Update cache assertions.

---
 .../src/FunctionalJavascript/StandardPerformanceTest.php    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index 6953efb09eda..05ac74b8ae1c 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -193,7 +193,7 @@ protected function testAnonymous(): void {
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
     $this->assertSame(14, $performance_data->getQueryCount());
-    $this->assertSame(78, $performance_data->getCacheGetCount());
+    $this->assertSame(77, $performance_data->getCacheGetCount());
     $this->assertSame(17, $performance_data->getCacheSetCount());
     $this->assertSame(0, $performance_data->getCacheDeleteCount());
     $this->assertSame(23, $performance_data->getCacheTagChecksumCount());
@@ -244,7 +244,7 @@ protected function testLogin(): void {
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
     $this->assertSame(17, $performance_data->getQueryCount());
-    $this->assertSame(84, $performance_data->getCacheGetCount());
+    $this->assertSame(82, $performance_data->getCacheGetCount());
     $this->assertSame(1, $performance_data->getCacheSetCount());
     $this->assertSame(1, $performance_data->getCacheDeleteCount());
     $this->assertSame(1, $performance_data->getCacheTagChecksumCount());
@@ -298,7 +298,7 @@ protected function testLoginBlock(): void {
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
     $this->assertSame(18, $performance_data->getQueryCount());
-    $this->assertSame(105, $performance_data->getCacheGetCount());
+    $this->assertSame(103, $performance_data->getCacheGetCount());
     $this->assertSame(1, $performance_data->getCacheSetCount());
     $this->assertSame(1, $performance_data->getCacheDeleteCount());
     $this->assertSame(1, $performance_data->getCacheTagChecksumCount());
-- 
GitLab


From 6a98da9ce63bbc1584a5d457f87c82e695c46dab Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Sun, 26 Jan 2025 13:13:35 +0000
Subject: [PATCH 35/38] concurrency back to 3.

---
 .gitlab-ci/pipeline.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index 3af38ca141ac..02b2f796fe95 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -138,7 +138,7 @@ variables:
 
 '🖱️️️ PHPUnit Functional Javascript':
   <<: [ *with-composer, *run-tests, *default-job-settings ]
-  parallel: 5
+  parallel: 3
   variables:
     TESTSUITE: PHPUnit-FunctionalJavascript
     CONCURRENCY: 5
-- 
GitLab


From bc5b1e49d4d60e5251de3617602115b5ba48f4f1 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Mon, 27 Jan 2025 10:13:24 +0000
Subject: [PATCH 36/38] Revert changes to StandardPerformanceTest.

---
 .../StandardPerformanceTest.php               | 93 +++++++++++--------
 1 file changed, 54 insertions(+), 39 deletions(-)

diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index 05ac74b8ae1c..c425f516695e 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -84,8 +84,6 @@ protected function testAnonymous(): void {
       $this->drupalGet('');
     }, 'standardFrontPage');
     $this->assertNoJavaScript($performance_data);
-    $this->assertSame(1, $performance_data->getStylesheetCount());
-    $this->assertLessThan(3500, $performance_data->getStylesheetBytes());
 
     $expected_queries = [
       'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."alias" LIKE "/node" ESCAPE ' . "'\\\\'" . ') AND ("base_table"."langcode" IN ("en", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
@@ -127,21 +125,24 @@ protected function testAnonymous(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $this->assertSame(36, $performance_data->getQueryCount());
-    $this->assertSame(122, $performance_data->getCacheGetCount());
-    $this->assertSame(45, $performance_data->getCacheSetCount());
-    $this->assertSame(0, $performance_data->getCacheDeleteCount());
-    $this->assertSame(37, $performance_data->getCacheTagChecksumCount());
-    $this->assertSame(43, $performance_data->getCacheTagIsValidCount());
-    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
+    $expected = [
+      'QueryCount' => 36,
+      'CacheGetCount' => 122,
+      'CacheSetCount' => 45,
+      'CacheDeleteCount' => 0,
+      'CacheTagChecksumCount' => 37,
+      'CacheTagIsValidCount' => 43,
+      'CacheTagInvalidationCount' => 0,
+      'StylesheetCount' => 1,
+      'StylesheetBytes' => 3450,
+    ];
+    $this->assertMetrics($expected, $performance_data);
 
     // Test node page.
     $performance_data = $this->collectPerformanceData(function () {
       $this->drupalGet('node/1');
     }, 'standardNodePage');
     $this->assertNoJavaScript($performance_data);
-    $this->assertSame(1, $performance_data->getStylesheetCount());
-    $this->assertLessThan(3500, $performance_data->getStylesheetBytes());
 
     $expected_queries = [
       'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."alias" LIKE "/node/1" ESCAPE ' . "'\\\\'" . ') AND ("base_table"."langcode" IN ("en", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
@@ -157,13 +158,18 @@ protected function testAnonymous(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $this->assertSame(10, $performance_data->getQueryCount());
-    $this->assertSame(92, $performance_data->getCacheGetCount());
-    $this->assertSame(16, $performance_data->getCacheSetCount());
-    $this->assertSame(0, $performance_data->getCacheDeleteCount());
     $this->assertCountBetween(24, 25, $performance_data->getCacheTagChecksumCount());
     $this->assertCountBetween(39, 40, $performance_data->getCacheTagIsValidCount());
-    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
+    $expected = [
+      'QueryCount' => 10,
+      'CacheGetCount' => 92,
+      'CacheSetCount' => 16,
+      'CacheDeleteCount' => 0,
+      'CacheTagInvalidationCount' => 0,
+      'StylesheetCount' => 1,
+      'StylesheetBytes' => 3150,
+    ];
+    $this->assertMetrics($expected, $performance_data);
 
     // Test user profile page.
     $this->user = $this->drupalCreateUser();
@@ -171,8 +177,6 @@ protected function testAnonymous(): void {
       $this->drupalGet('user/' . $this->user->id());
     }, 'standardUserPage');
     $this->assertNoJavaScript($performance_data);
-    $this->assertSame(1, $performance_data->getStylesheetCount());
-    $this->assertLessThan(3500, $performance_data->getStylesheetBytes());
 
     $expected_queries = [
       'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."alias" LIKE "/user/2" ESCAPE ' . "'\\\\'" . ') AND ("base_table"."langcode" IN ("en", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
@@ -192,13 +196,18 @@ protected function testAnonymous(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $this->assertSame(14, $performance_data->getQueryCount());
-    $this->assertSame(77, $performance_data->getCacheGetCount());
-    $this->assertSame(17, $performance_data->getCacheSetCount());
-    $this->assertSame(0, $performance_data->getCacheDeleteCount());
-    $this->assertSame(23, $performance_data->getCacheTagChecksumCount());
-    $this->assertSame(32, $performance_data->getCacheTagIsValidCount());
-    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
+    $expected = [
+      'QueryCount' => 14,
+      'CacheGetCount' => 77,
+      'CacheSetCount' => 17,
+      'CacheDeleteCount' => 0,
+      'CacheTagChecksumCount' => 23,
+      'CacheTagIsValidCount' => 32,
+      'CacheTagInvalidationCount' => 0,
+      'StylesheetCount' => 1,
+      'StylesheetBytes' => 3150,
+    ];
+    $this->assertMetrics($expected, $performance_data);
   }
 
   /**
@@ -243,13 +252,16 @@ protected function testLogin(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $this->assertSame(17, $performance_data->getQueryCount());
-    $this->assertSame(82, $performance_data->getCacheGetCount());
-    $this->assertSame(1, $performance_data->getCacheSetCount());
-    $this->assertSame(1, $performance_data->getCacheDeleteCount());
-    $this->assertSame(1, $performance_data->getCacheTagChecksumCount());
-    $this->assertSame(37, $performance_data->getCacheTagIsValidCount());
-    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
+    $expected = [
+      'QueryCount' => 17,
+      'CacheGetCount' => 82,
+      'CacheSetCount' => 1,
+      'CacheDeleteCount' => 1,
+      'CacheTagChecksumCount' => 1,
+      'CacheTagIsValidCount' => 37,
+      'CacheTagInvalidationCount' => 0,
+    ];
+    $this->assertMetrics($expected, $performance_data);
     $this->drupalLogout();
   }
 
@@ -297,13 +309,16 @@ protected function testLoginBlock(): void {
     ];
     $recorded_queries = $performance_data->getQueries();
     $this->assertSame($expected_queries, $recorded_queries);
-    $this->assertSame(18, $performance_data->getQueryCount());
-    $this->assertSame(103, $performance_data->getCacheGetCount());
-    $this->assertSame(1, $performance_data->getCacheSetCount());
-    $this->assertSame(1, $performance_data->getCacheDeleteCount());
-    $this->assertSame(1, $performance_data->getCacheTagChecksumCount());
-    $this->assertSame(43, $performance_data->getCacheTagIsValidCount());
-    $this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
+    $expected = [
+      'QueryCount' => 18,
+      'CacheGetCount' => 103,
+      'CacheSetCount' => 1,
+      'CacheDeleteCount' => 1,
+      'CacheTagChecksumCount' => 1,
+      'CacheTagIsValidCount' => 43,
+      'CacheTagInvalidationCount' => 0,
+    ];
+    $this->assertMetrics($expected, $performance_data);
   }
 
   /**
-- 
GitLab


From 1195075e8521de1c80aeb49a6c1b7de5219dcd66 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Mon, 27 Jan 2025 10:43:44 +0000
Subject: [PATCH 37/38] Revert changes to run-tests.sh

---
 core/scripts/run-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 9e6fd1f4cf0c..04e1f2c05258 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -1263,7 +1263,7 @@ function simpletest_script_reporter_write_xml_results(TestRunResultsStorageInter
         }
         $test_class = $result->test_class;
         if (!isset($xml_files[$test_class])) {
-          $doc = new DOMDocument('1.0');
+          $doc = new DOMDocument('1.0', 'utf-8');
           $root = $doc->createElement('testsuite');
           $root = $doc->appendChild($root);
           $xml_files[$test_class] = ['doc' => $doc, 'suite' => $root];
-- 
GitLab


From 5d53739dad68a960bc11902d4c8ca867f8331066 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Mon, 27 Jan 2025 12:35:21 +0000
Subject: [PATCH 38/38] Add an explanatory comment.

---
 .../Drupal/FunctionalJavascriptTests/WebDriverTestBase.php     | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index 8fac5791f36e..627e24f317c9 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
@@ -60,6 +60,9 @@ protected function initMink() {
       return parent::initMink();
     }
     catch (\Exception $e) {
+      // 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;
     }
-- 
GitLab