From cd7af4c2d03411079eb0627e5e830bc167c280a1 Mon Sep 17 00:00:00 2001 From: Alexandre Gomes Gaigalas Date: Wed, 22 Apr 2026 15:53:56 -0300 Subject: [PATCH] Make stress tests less stressful Reduces the amount of memory usage and make tests faster, we don't actually need a router with 2500 patterns or so, 100 is already huge. --- tests/RouterTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/RouterTest.php b/tests/RouterTest.php index 32faabd..be7f93c 100644 --- a/tests/RouterTest.php +++ b/tests/RouterTest.php @@ -722,24 +722,24 @@ public static function providerForLargeParams(): array ['a', 'a', 'a', 'a', 'a', 'a', 'a'], ], [ - '/users' . str_repeat('/*', 2500), - '/users' . str_repeat('/xy', 2500), - str_split(str_repeat('xy', 2500), 2), + '/users' . str_repeat('/*', 100), + '/users' . str_repeat('/xy', 100), + str_split(str_repeat('xy', 100), 2), ], [ - '/users' . str_repeat('/*', 2500), - '/users' . str_repeat('/abcdefghijklmnopqrstuvwxyz', 2500), - str_split(str_repeat('abcdefghijklmnopqrstuvwxyz', 2500), 26), + '/users' . str_repeat('/*', 100), + '/users' . str_repeat('/abcdefghijklmnopqrstuvwxyz', 100), + str_split(str_repeat('abcdefghijklmnopqrstuvwxyz', 100), 26), ], [ - '/users' . str_repeat('/*', 2500), + '/users' . str_repeat('/*', 100), '/users' . str_repeat( '/abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', - 2500, + 100, ), str_split(str_repeat( 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', - 2500, + 100, ), 26 * 3), ], ];