diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
index 929a307..e2cfd91 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -10,6 +10,7 @@
 use Drupal\Core\KeyValueStore\KeyValueMemoryFactory;
 use Drupal\Core\Render\Element;
 use Drupal\Core\State\State;
+use Drupal\Core\Cache\Cache;
 
 /**
  * @coversDefaultClass \Drupal\Core\Render\Renderer
@@ -114,6 +115,7 @@ public function providerTestContextBubblingEdgeCases() {
         '#cache' => [
           'contexts' => ['foo'],
           'tags' => [],
+          'max-age' => Cache::PERMANENT,
         ],
         '#post_render_cache' => [],
         '#markup' => 'parent',
@@ -142,6 +144,7 @@ public function providerTestContextBubblingEdgeCases() {
         '#cache' => [
           'contexts' => [],
           'tags' => [],
+          'max-age' => Cache::PERMANENT,
         ],
         '#post_render_cache' => [],
         '#markup' => 'parent',
@@ -165,6 +168,7 @@ public function providerTestContextBubblingEdgeCases() {
         '#cache' => [
           'contexts' => [],
           'tags' => [],
+          'max-age' => Cache::PERMANENT,
         ],
         '#post_render_cache' => [],
         '#markup' => '',
@@ -196,6 +200,7 @@ public function providerTestContextBubblingEdgeCases() {
       'child' => [
         '#cache' => [
           'contexts' => ['foo', 'baz'],
+          'max-age' => 3600,
         ],
       ],
     ];
@@ -205,6 +210,7 @@ public function providerTestContextBubblingEdgeCases() {
         '#cache' => [
           'contexts' => ['bar', 'baz', 'foo'],
           'tags' => [],
+          'max-age' => 3600,
         ],
         '#post_render_cache' => [],
         '#markup' => 'parent',
@@ -251,6 +257,7 @@ public function providerTestContextBubblingEdgeCases() {
         '#cache' => [
           'contexts' => ['bar', 'foo'],
           'tags' => ['dee', 'fiddle', 'har', 'yar'],
+          'max-age' => Cache::PERMANENT,
         ],
         '#post_render_cache' => [],
         '#markup' => 'parent',
@@ -339,6 +346,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
       '#cache' => [
         'contexts' => ['user.roles'],
         'tags' => ['a', 'b'],
+        'max-age' => Cache::PERMANENT,
       ],
       '#post_render_cache' => [],
       '#markup' => 'parent',
@@ -362,6 +370,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
       '#cache' => [
         'contexts' => ['foo', 'user.roles'],
         'tags' => ['a', 'b', 'c'],
+        'max-age' => Cache::PERMANENT,
       ],
       '#post_render_cache' => [],
       '#markup' => 'parent',
@@ -393,6 +402,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
       '#cache' => [
         'contexts' => ['foo', 'user.roles'],
         'tags' => ['a', 'b'],
+        'max-age' => Cache::PERMANENT,
       ],
       '#post_render_cache' => [],
       '#markup' => 'parent',
@@ -417,6 +427,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
       '#cache' => [
         'contexts' => ['bar', 'foo', 'user.roles'],
         'tags' => ['a', 'b', 'c', 'd'],
+        'max-age' => Cache::PERMANENT,
       ],
       '#post_render_cache' => [],
       '#markup' => 'parent',
@@ -432,6 +443,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
       '#cache' => [
         'contexts' => ['bar', 'foo', 'user.roles'],
         'tags' => ['a', 'b'],
+        'max-age' => Cache::PERMANENT,
       ],
       '#post_render_cache' => [],
       '#markup' => 'parent',
@@ -447,6 +459,7 @@ public function testConditionalCacheContextBubblingSelfHealing() {
       '#cache' => [
         'contexts' => ['bar', 'foo', 'user.roles'],
         'tags' => ['a', 'b', 'c'],
+        'max-age' => Cache::PERMANENT,
       ],
       '#post_render_cache' => [],
       '#markup' => 'parent',
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPostRenderCacheTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPostRenderCacheTest.php
index da9f232..53e30d6 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPostRenderCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPostRenderCacheTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Render\Element;
+use Drupal\Core\Cache\Cache;
 
 /**
  * @coversDefaultClass \Drupal\Core\Render\Renderer
@@ -92,6 +93,7 @@ public function testPostRenderCacheWithColdCache() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
     $this->assertSame($cached_element, $expected_element, 'The correct data is cached: the stored #markup and #attached properties are not affected by #post_render_cache callbacks.');
@@ -228,6 +230,7 @@ public function testRenderChildrenPostRenderCacheDifferentContexts() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
 
@@ -323,6 +326,7 @@ public function testRenderChildrenPostRenderCacheComplex() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
 
@@ -349,6 +353,7 @@ public function testRenderChildrenPostRenderCacheComplex() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
 
@@ -463,6 +468,7 @@ public function testPlaceholder() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
     $this->assertSame($cached_element, $expected_element, 'The correct data is cached: the stored #markup and #attached properties are not affected by #post_render_cache callbacks.');
@@ -561,6 +567,7 @@ public function testChildElementPlaceholder() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
     $this->assertSame($cached_element, $expected_element, 'The correct data is cached for the child element: the stored #markup and #attached properties are not affected by #post_render_cache callbacks.');
@@ -589,6 +596,7 @@ public function testChildElementPlaceholder() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
     $this->assertSame($cached_element, $expected_element, 'The correct data is cached for the parent element: the stored #markup and #attached properties are not affected by #post_render_cache callbacks.');
@@ -620,6 +628,7 @@ public function testChildElementPlaceholder() {
       '#cache' => [
         'contexts' => [],
         'tags' => [],
+        'max-age' => Cache::PERMANENT,
       ],
     ];
     $this->assertSame($cached_element, $expected_element, 'The correct data is cached for the child element: the stored #markup and #attached properties are not affected by #post_render_cache callbacks.');
