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

Change subject: Fix cindy failures
......................................................................


Fix cindy failures

Increased min word length for morelike querie to 2 to avoid matching
pages on the word "1" and make sure that ChangeMe is on the first
page.
Removed inc links boosting on one test to make sure we test text features
only.
Wrapped wfGetDB() in Checker::getDB() to force proper annotations with
IDatabase to resolve an annotation problem on Database or phan that is
not able to infer param types from interface.

Change-Id: Ifde771eb17ebeb7470964db617514b6cac1c89a1
---
M includes/Sanity/Checker.php
M tests/browser/features/exact_quotes_api.feature
M tests/browser/features/more_like_this_options.feature
3 files changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Sanity/Checker.php b/includes/Sanity/Checker.php
index ae44be2..9e805d8 100644
--- a/includes/Sanity/Checker.php
+++ b/includes/Sanity/Checker.php
@@ -291,7 +291,7 @@
                if ( empty( $pageIds ) ) {
                        return $cache->getArrayCopy();
                }
-               $dbr = wfGetDB( DB_REPLICA );
+               $dbr = $this->getDB();
                $where = 'page_id IN (' . $dbr->makeList( $pageIds ) . ')';
                $res = $dbr->select(
                        [ 'page' ],
@@ -307,6 +307,13 @@
        }
 
        /**
+        * @return \IDatabase
+        */
+       private function getDB() {
+               return wfGetDB( DB_REPLICA );
+       }
+
+       /**
         * @param string[] $docIds document ids
         * @return \Elastica\Result[][] search results indexed by page id
         * @throws \Exception if an error occurred
diff --git a/tests/browser/features/exact_quotes_api.feature 
b/tests/browser/features/exact_quotes_api.feature
index 5d071cf..5475c38 100644
--- a/tests/browser/features/exact_quotes_api.feature
+++ b/tests/browser/features/exact_quotes_api.feature
@@ -45,7 +45,7 @@
     Then there are no api search results
 
   Scenario: Searching for a quoted * actually searches for a *
-    When I api search for "pick*"
+    When I api search with query independent profile empty for "pick*"
     Then Pick* is the first api search result
 
   Scenario Outline: Searching for "<word> <word>"~<number> activates a 
proximity search
diff --git a/tests/browser/features/more_like_this_options.feature 
b/tests/browser/features/more_like_this_options.feature
index ba0a180..f41ab68 100644
--- a/tests/browser/features/more_like_this_options.feature
+++ b/tests/browser/features/more_like_this_options.feature
@@ -29,7 +29,7 @@
     Then there are no search results
 
   Scenario: Searching for morelike:<page> with the title field and settings 
with poor precision
-    When I set More Like This Options to title field, word length to 1 and I 
search for morelike:More Like Me 1
+    When I set More Like This Options to title field, word length to 2 and I 
search for morelike:More Like Me 1
     Then ChangeMe is in the search results
 
   Scenario: Searching for morelike:<page> with the all field works even if 
cirrusMtlUseFields is set to yes

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifde771eb17ebeb7470964db617514b6cac1c89a1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to