diff --git a/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/DatabaseStorageExpirableTest.php b/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/DatabaseStorageExpirableTest.php
index 2a4c7a7d803f2f0f4e02d1410c324ae5f3a480c7..191989ef9b3d0cfb966c5a83f00c421980fd4533 100644
--- a/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/DatabaseStorageExpirableTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/DatabaseStorageExpirableTest.php
@@ -47,19 +47,19 @@ public function testCRUDWithExpiration() {
 
     // Verify that an item can be stored with setWithExpire().
     // Use a random expiration in each test.
-    $stores[0]->setWithExpire('foo', $this->objects[0], rand(500, 299792458));
+    $stores[0]->setWithExpire('foo', $this->objects[0], rand(500, 100000));
     $this->assertIdenticalObject($this->objects[0], $stores[0]->get('foo'));
     // Verify that the other collection is not affected.
     $this->assertFalse($stores[1]->get('foo'));
 
     // Verify that an item can be updated with setWithExpire().
-    $stores[0]->setWithExpire('foo', $this->objects[1], rand(500, 299792458));
+    $stores[0]->setWithExpire('foo', $this->objects[1], rand(500, 100000));
     $this->assertIdenticalObject($this->objects[1], $stores[0]->get('foo'));
     // Verify that the other collection is still not affected.
     $this->assertFalse($stores[1]->get('foo'));
 
     // Verify that the expirable data key is unique.
-    $stores[1]->setWithExpire('foo', $this->objects[2], rand(500, 299792458));
+    $stores[1]->setWithExpire('foo', $this->objects[2], rand(500, 100000));
     $this->assertIdenticalObject($this->objects[1], $stores[0]->get('foo'));
     $this->assertIdenticalObject($this->objects[2], $stores[1]->get('foo'));
 
@@ -68,7 +68,7 @@ public function testCRUDWithExpiration() {
       'foo' => $this->objects[3],
       'bar' => $this->objects[4],
     );
-    $stores[0]->setMultipleWithExpire($values, rand(500, 299792458));
+    $stores[0]->setMultipleWithExpire($values, rand(500, 100000));
     $result = $stores[0]->getMultiple(array('foo', 'bar'));
     foreach ($values as $j => $value) {
       $this->assertIdenticalObject($value, $result[$j]);
@@ -104,7 +104,7 @@ public function testCRUDWithExpiration() {
     for ($i = 0; $i <= 1; $i++) {
       // setWithExpireIfNotExists() should be TRUE the first time (when $i is
       // 0) and FALSE the second time (when $i is 1).
-      $this->assertEqual(!$i, $stores[0]->setWithExpireIfNotExists($key, $this->objects[$i], rand(500, 299792458)));
+      $this->assertEqual(!$i, $stores[0]->setWithExpireIfNotExists($key, $this->objects[$i], rand(500, 100000)));
       $this->assertIdenticalObject($this->objects[0], $stores[0]->get($key));
       // Verify that the other collection is not affected.
       $this->assertFalse($stores[1]->get($key));
@@ -112,7 +112,7 @@ public function testCRUDWithExpiration() {
 
     // Remove the item and try to set it again.
     $stores[0]->delete($key);
-    $stores[0]->setWithExpireIfNotExists($key, $this->objects[1], rand(500, 299792458));
+    $stores[0]->setWithExpireIfNotExists($key, $this->objects[1], rand(500, 100000));
     // This time it should succeed.
     $this->assertIdenticalObject($this->objects[1], $stores[0]->get($key));
     // Verify that the other collection is still not affected.