From 18071b07b4651e598575ff9597e1afd440e9df35 Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Sun, 19 Jan 2025 17:34:42 +0000 Subject: [PATCH] Issue #3500489 by plopesc, catch: Performance tests should uninstall automated_cron --- .../tests/src/FunctionalJavascript/PerformanceTest.php | 4 ++-- .../OpenTelemetryAuthenticatedPerformanceTest.php | 2 +- .../FunctionalJavascript/StandardPerformanceTest.php | 10 +++++----- .../FunctionalJavascriptTests/PerformanceTestBase.php | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php b/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php index 676eaf755e51..7a4d2b68b40b 100644 --- a/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php +++ b/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php @@ -73,14 +73,14 @@ public function testLogin(): void { $expected = [ 'QueryCount' => 4, - 'CacheGetCount' => 61, + 'CacheGetCount' => 60, 'CacheSetCount' => 2, 'CacheDeleteCount' => 0, 'CacheTagChecksumCount' => 2, 'CacheTagIsValidCount' => 29, 'CacheTagInvalidationCount' => 0, 'ScriptCount' => 2, - 'ScriptBytes' => 220000, + 'ScriptBytes' => 215500, 'StylesheetCount' => 1, 'StylesheetBytes' => 90200, ]; diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php index a455cb1544d7..df52db42bfaf 100644 --- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php +++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php @@ -48,7 +48,7 @@ public function testFrontPageAuthenticatedWarmCache(): void { $expected = [ 'QueryCount' => 4, - 'CacheGetCount' => 42, + 'CacheGetCount' => 40, 'CacheSetCount' => 0, 'CacheDeleteCount' => 0, 'CacheTagChecksumCount' => 0, diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php index 3dcb3107fbea..c425f516695e 100644 --- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php +++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php @@ -127,7 +127,7 @@ protected function testAnonymous(): void { $this->assertSame($expected_queries, $recorded_queries); $expected = [ 'QueryCount' => 36, - 'CacheGetCount' => 123, + 'CacheGetCount' => 122, 'CacheSetCount' => 45, 'CacheDeleteCount' => 0, 'CacheTagChecksumCount' => 37, @@ -162,7 +162,7 @@ protected function testAnonymous(): void { $this->assertCountBetween(39, 40, $performance_data->getCacheTagIsValidCount()); $expected = [ 'QueryCount' => 10, - 'CacheGetCount' => 93, + 'CacheGetCount' => 92, 'CacheSetCount' => 16, 'CacheDeleteCount' => 0, 'CacheTagInvalidationCount' => 0, @@ -198,7 +198,7 @@ protected function testAnonymous(): void { $this->assertSame($expected_queries, $recorded_queries); $expected = [ 'QueryCount' => 14, - 'CacheGetCount' => 78, + 'CacheGetCount' => 77, 'CacheSetCount' => 17, 'CacheDeleteCount' => 0, 'CacheTagChecksumCount' => 23, @@ -254,7 +254,7 @@ protected function testLogin(): void { $this->assertSame($expected_queries, $recorded_queries); $expected = [ 'QueryCount' => 17, - 'CacheGetCount' => 84, + 'CacheGetCount' => 82, 'CacheSetCount' => 1, 'CacheDeleteCount' => 1, 'CacheTagChecksumCount' => 1, @@ -311,7 +311,7 @@ protected function testLoginBlock(): void { $this->assertSame($expected_queries, $recorded_queries); $expected = [ 'QueryCount' => 18, - 'CacheGetCount' => 105, + 'CacheGetCount' => 103, 'CacheSetCount' => 1, 'CacheDeleteCount' => 1, 'CacheTagChecksumCount' => 1, diff --git a/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php index e08e1c27b1d2..d624e03c00d9 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php @@ -27,6 +27,7 @@ class PerformanceTestBase extends WebDriverTestBase { protected function setUp(): void { parent::setUp(); $this->doSetUpTasks(); + \Drupal::service('module_installer')->uninstall(['automated_cron']); } /** -- GitLab