Skip to content

Commit cd7af4c

Browse files
committed
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.
1 parent 3b5efc3 commit cd7af4c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tests/RouterTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -722,24 +722,24 @@ public static function providerForLargeParams(): array
722722
['a', 'a', 'a', 'a', 'a', 'a', 'a'],
723723
],
724724
[
725-
'/users' . str_repeat('/*', 2500),
726-
'/users' . str_repeat('/xy', 2500),
727-
str_split(str_repeat('xy', 2500), 2),
725+
'/users' . str_repeat('/*', 100),
726+
'/users' . str_repeat('/xy', 100),
727+
str_split(str_repeat('xy', 100), 2),
728728
],
729729
[
730-
'/users' . str_repeat('/*', 2500),
731-
'/users' . str_repeat('/abcdefghijklmnopqrstuvwxyz', 2500),
732-
str_split(str_repeat('abcdefghijklmnopqrstuvwxyz', 2500), 26),
730+
'/users' . str_repeat('/*', 100),
731+
'/users' . str_repeat('/abcdefghijklmnopqrstuvwxyz', 100),
732+
str_split(str_repeat('abcdefghijklmnopqrstuvwxyz', 100), 26),
733733
],
734734
[
735-
'/users' . str_repeat('/*', 2500),
735+
'/users' . str_repeat('/*', 100),
736736
'/users' . str_repeat(
737737
'/abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz',
738-
2500,
738+
100,
739739
),
740740
str_split(str_repeat(
741741
'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz',
742-
2500,
742+
100,
743743
), 26 * 3),
744744
],
745745
];

0 commit comments

Comments
 (0)