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

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

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

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 assigned this task to ori.

Fixed month ago via ori patch