Page MenuHomePhabricator

cirrus browser tests fail on Vagrant (and probably in other places)
Closed, ResolvedPublic


While trying to test elasticsearch upgrade to 1.7.5, I tried to run browser tests in local Vagrant. Cirrus browser tests fail in multiple places. This seems to be related to (upgrade to latest version of mediawiki_selenium).

Event Timeline

Gehel created this task.Feb 16 2016, 3:15 PM
Gehel claimed this task.
Gehel raised the priority of this task from to Needs Triage.
Gehel updated the task description. (Show Details)
Gehel added a subscriber: Gehel.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 16 2016, 3:15 PM
Gehel added a comment.Feb 16 2016, 3:44 PM

Seems that credentials are not loaded from environments.yml for API tests. Workaround: export MEDIAWIKI_USER=admin and export MEDIAWIKI_PASSWORD=[...].

Gehel added a comment.Feb 16 2016, 4:01 PM
vagrant@mediawiki-vagrant:/vagrant/mediawiki/extensions/CirrusSearch/tests/browser$ bundle exec cucumber --tags ~@expect_failure
@bad_syntax @clean @api
Feature: Searches with syntax errors

  Scenario: Searching for <text>~<text> treats the tilde like a space except that the whole "word" (including tilde) makes a phrase search # features/bad_syntax_api.feature:4
    When I api search for ffnonesenseword~catapult                                                                                         # features/step_definitions/search_steps.rb:30
    Then Two Words is the first api search result                                                                                          # features/step_definitions/search_steps.rb:304
      undefined method `[]' for nil:NilClass (NoMethodError)
      ./features/step_definitions/search_steps.rb:310:in `block (2 levels) in <top (required)>'
      ./features/step_definitions/search_steps.rb:308:in `map'
      ./features/step_definitions/search_steps.rb:308:in `/^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search result$/'
      features/bad_syntax_api.feature:6:in `Then Two Words is the first api search result'

Looks like search is not happening (@api_search is nil). Still wondering why...

Gehel added a comment.Feb 16 2016, 5:30 PM

Above error fixed: elasticsearch was not running. Error reporting could be improved a bit, or this could be a check added to tests prerequisites...

environment.yml is not loaded, I do not understand why. Using environment variables instead seems to work.

Gehel added a subscriber: dcausse.Feb 17 2016, 5:46 PM

After much investigation and help from @dcausse, most tests are passing for me locally. Issues were between chair and keyboard.

As a blocker for T122697: Upgrade ElasticSearch to 1.7.5, this shoudl not be an issue anymore. I'll make sure the same tests are failing before and after the elastic search update.

Deskana closed this task as Resolved.Feb 18 2016, 4:15 AM
Deskana triaged this task as Normal priority.