Hi Stas, That sleep()s are used only if you run tests with O+ enabled. Rhey used only in ~10 phar relate tests that update on the fly and include the same files. With cache enabled these files has to have different modification times.
Actually, we may just disable O+, but my goal was to check O+ with the whole php test suite. Moving the code in separate file may make sense. Thanks. Dmitry. On Sat, Mar 16, 2013 at 9:42 PM, Stas Malyshev <smalys...@sugarcrm.com>wrote: > Hi! > > > Commit: e9641141aaad136757af06fddd6d870147ac2000 > > Author: Dmitry Stogov <dmi...@zend.com> Sat, 16 Mar 2013 > 16:11:00 +0400 > > Parents: 92430bcf5dd76bf9b12363693efcc471b3527618 > > Branches: PHP-5.5 master > > > > Link: > http://git.php.net/?p=php-src.git;a=commitdiff;h=e9641141aaad136757af06fddd6d870147ac2000 > > > > Log: > > Made test compatible with O+ > > +if (function_exists("opcache_get_status")) { > + $status = opcache_get_status(); > + if ($status["opcache_enabled"]) { > + ini_set("opcache.revalidate_freq", "0"); > + sleep(2); > + } > +} > > Why we need sleep here? Our tests are not too fast anyway, but adding so > many sleeps will add another 20-30 secs to the run, can't we do without > it? Also, doesn't it make sense to put this code into some file and not > copy it into every test separately? > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 >