Page MenuHomePhabricator

sleep() calls in PHPSessionHandlerTest::testSessionHandling() slow down test runs
Closed, ResolvedPublic

Description

PHPSessionHandlerTest::testSessionHandling() sleeps for three seconds each time it is invoked. It gets invoked three times (once for each dataset provided by its dataProvider method), for a total of 9 seconds, making it the slowest test in core by a comfortable margin. There ought to be a way to simulate the passage of time using mocks and test doubles.

Event Timeline

ori created this task.May 18 2016, 12:55 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 18 2016, 12:55 AM

Change 289360 had a related patch set uploaded (by Ori.livneh):
PHPSessionHandlerTest: don't sleep() to test PHP

https://gerrit.wikimedia.org/r/289360

hashar added a subscriber: hashar.May 18 2016, 10:54 AM

The sleep( 3 ) has been introduced by rMW25dbd91513f1: Clean up after Ie161e0f

Change 289360 merged by jenkins-bot:
Remove a test case from PHPSessionHandlerTest::testSessionHandling()

https://gerrit.wikimedia.org/r/289360

Change 292130 had a related patch set uploaded (by Hashar):
Remove a test case from PHPSessionHandlerTest::testSessionHandling()

https://gerrit.wikimedia.org/r/292130

Change 292130 merged by jenkins-bot:
Remove a test case from PHPSessionHandlerTest::testSessionHandling()

https://gerrit.wikimedia.org/r/292130

hashar closed this task as Resolved.Aug 25 2016, 11:03 AM
hashar assigned this task to ori.

Fixed month ago via ori patch

Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:39 PM