diff --git a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
index e458375152eb9b6e3fad32a17e56f18d2352287e..38e8b841c96a2e12abc8f61c8667515199dcef0f 100644
--- a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
@@ -161,7 +161,7 @@ public function providerTestOtherMethods() {
       ['read', 'some-session-data', ['a-session-id']],
       ['close', TRUE, []],
       ['destroy', TRUE, ['old-session-id']],
-      ['gc', TRUE, [42]],
+      ['gc', 0, [42]],
     ];
   }