jenkins-bot has submitted this change and it was merged.

Change subject: When testing force job updates on page views
......................................................................


When testing force job updates on page views

Cirrus relies on delayed jobs and by default those are only checked every
5 minutes or so.  This checks them on every page view in the testing config.
This allows our tests to run much more quickly.

Also engages the experimental highlighter in testing.  Mostly because
to get this config working nicely in vagrant we use
Ib0ed378be272940d49e47a335e57123a1ecc6a78 which would undo that.

Change-Id: I81f2c37a1962d46643965d3706580d961701dca3
---
M tests/jenkins/Jenkins.php
1 file changed, 13 insertions(+), 1 deletion(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php
index 7a839fc..cdaf3a4 100644
--- a/tests/jenkins/Jenkins.php
+++ b/tests/jenkins/Jenkins.php
@@ -1,6 +1,8 @@
 <?php
 namespace CirrusSearch\Jenkins;
 
+use \JobQueueGroup;
+
 /**
  * Sets up configuration required to run the browser tests on Jenkins.
  *
@@ -33,6 +35,8 @@
 $wgAutoloadClasses[ 'CirrusSearch\Jenkins\CleanSetup' ] = __DIR__ . 
'/cleanSetup.php';
 $wgAutoloadClasses[ 'CirrusSearch\Jenkins\NukeAllIndexes' ] = __DIR__ . 
'/nukeAllIndexes.php';
 $wgHooks[ 'LoadExtensionSchemaUpdates' ][] = 
'CirrusSearch\Jenkins\Jenkins::installDatabaseUpdatePostActions';
+$wgHooks[ 'BeforeInitialize' ][] = 
'CirrusSearch\Jenkins\Jenkins::recyclePruneAndUndelayJobs';
+
 
 // Dependencies
 // Jenkins will automatically load these for us but it makes this file more 
generally useful
@@ -45,6 +49,8 @@
 
 // Configuration
 $wgSearchType = 'CirrusSearch';
+$wgCirrusSearchUseExperimentalHighlighter = true;
+$wgCirrusSearchOptimizeIndexForExperimentalHighlighter = true;
 $wgOggThumbLocation = '/usr/bin/oggThumb';
 $wgGroupPermissions[ '*' ][ 'deleterevision' ] = true;
 $wgFileExtensions[] = 'pdf';
@@ -56,7 +62,6 @@
        'order' => 'fifo',
        'redisServer' => 'localhost',
        'checkDelay' => true,
-       'maximumPeriodicTaskSeconds' => 1,
        'redisConfig' => array(
                'password' => $wgRedisPassword,
        ),
@@ -89,4 +94,11 @@
                $updater->addPostDatabaseUpdateMaintenance( 
'CirrusSearch\Jenkins\CleanSetup');
                return true;
        }
+
+       public static function recyclePruneAndUndelayJobs( $special, $subpage ) 
{
+               $jobQueue = JobQueueGroup::singleton()->get( 
'cirrusSearchLinksUpdateSecondary' );
+               if ( $jobQueue ) {
+                       $jobQueue->recyclePruneAndUndelayJobs();
+               }
+       }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/129177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I81f2c37a1962d46643965d3706580d961701dca3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to