[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Bug: Relaunch the tests before 5 minutes removed some coverage
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380315 ) Change subject: Bug: Relaunch the tests before 5 minutes removed some coverage .. Bug: Relaunch the tests before 5 minutes removed some coverage Given a test touch the mtime of a file with 5 minutes in the future, the next launch before 5 minutes elapsed lacked some coverage. Resetting the mtime to its original value at the end of the test. PS: commit sent from a French train TGV :) Change-Id: I2808e3d22a70cb4cdff3e09f315915a5687cddb1 --- M tests/phpunit/MultiversionInstallationTest.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Seb35: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/MultiversionInstallationTest.php b/tests/phpunit/MultiversionInstallationTest.php index 4a0186e..5ff1323 100644 --- a/tests/phpunit/MultiversionInstallationTest.php +++ b/tests/phpunit/MultiversionInstallationTest.php @@ -512,8 +512,8 @@ # Read the existence cache $farm = new MediaWikiFarm( 'a.testfarm-multiversion.example.org', null, self::$wgMediaWikiFarmConfigDir, self::$wgMediaWikiFarmCodeDir, self::$wgMediaWikiFarmCacheDir, - array( 'EntryPoint' => 'index.php' ) - ); + array( 'EntryPoint' => 'index.php' ) + ); $this->assertTrue( $farm->checkExistence() ); @@ -538,6 +538,9 @@ array( 'EntryPoint' => 'index.php' ) ); $this->assertFalse( is_file( self::$wgMediaWikiFarmCacheDir . '/LocalSettings/a.testfarm-multiversion.example.org.php' ) ); + + # Reinit mtime of farms.php for further tests + $this->assertTrue( touch( self::$wgMediaWikiFarmConfigDir . '/farms.php', time() - 5 ) ); } /** -- To view, visit https://gerrit.wikimedia.org/r/380315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2808e3d22a70cb4cdff3e09f315915a5687cddb1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MediaWikiFarm Gerrit-Branch: master Gerrit-Owner: Seb35Gerrit-Reviewer: Hashar Gerrit-Reviewer: Seb35 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Bug: Relaunch the tests before 5 minutes removed some coverage
Seb35 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380315 ) Change subject: Bug: Relaunch the tests before 5 minutes removed some coverage .. Bug: Relaunch the tests before 5 minutes removed some coverage Given a test touch the mtime of a file with 5 minutes in the future, the next launch before 5 minutes elapsed lacked some coverage. Resetting the mtime to its original value at the end of the test. PS: commit sent from a French train TGV :) Change-Id: I2808e3d22a70cb4cdff3e09f315915a5687cddb1 --- M tests/phpunit/MultiversionInstallationTest.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm refs/changes/15/380315/1 diff --git a/tests/phpunit/MultiversionInstallationTest.php b/tests/phpunit/MultiversionInstallationTest.php index 4a0186e..5ff1323 100644 --- a/tests/phpunit/MultiversionInstallationTest.php +++ b/tests/phpunit/MultiversionInstallationTest.php @@ -512,8 +512,8 @@ # Read the existence cache $farm = new MediaWikiFarm( 'a.testfarm-multiversion.example.org', null, self::$wgMediaWikiFarmConfigDir, self::$wgMediaWikiFarmCodeDir, self::$wgMediaWikiFarmCacheDir, - array( 'EntryPoint' => 'index.php' ) - ); + array( 'EntryPoint' => 'index.php' ) + ); $this->assertTrue( $farm->checkExistence() ); @@ -538,6 +538,9 @@ array( 'EntryPoint' => 'index.php' ) ); $this->assertFalse( is_file( self::$wgMediaWikiFarmCacheDir . '/LocalSettings/a.testfarm-multiversion.example.org.php' ) ); + + # Reinit mtime of farms.php for further tests + $this->assertTrue( touch( self::$wgMediaWikiFarmConfigDir . '/farms.php', time() - 5 ) ); } /** -- To view, visit https://gerrit.wikimedia.org/r/380315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2808e3d22a70cb4cdff3e09f315915a5687cddb1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MediaWikiFarm Gerrit-Branch: master Gerrit-Owner: Seb35___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits