diff --git a/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php b/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
index a38a5f0180f31769c8e0d80f6fe529298cba0d02..2ba40a043a1a6aa8ee9664fafdaca45a3a644def 100644
--- a/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
+++ b/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
@@ -102,6 +102,7 @@ public function testInnerPagerQuery() {
 
     $outer_query = $connection->select($query);
     $outer_query->addField('subquery', 'age');
+    $outer_query->orderBy('age');
 
     $ages = $outer_query
       ->execute()