Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transient spec failure in RequestController #8561

Closed
gbp opened this issue Feb 3, 2025 · 1 comment · Fixed by #8562
Closed

Transient spec failure in RequestController #8561

gbp opened this issue Feb 3, 2025 · 1 comment · Fixed by #8562
Labels
bug Breaks expected functionality f:test-suite

Comments

@gbp
Copy link
Member

gbp commented Feb 3, 2025

We regularly see CI failures for RequestController if it's test examples are run early in the test run. For example seed 21998

RequestController when listing recent requests F.......

  1) RequestController when listing recent requests sets title based on page
     Failure/Error: raise "Failed to open Xapian database #{@@db_path}: #{e.message}"

     RuntimeError:
       Failed to open Xapian database /home/runner/work/alaveteli/alaveteli/lib/acts_as_xapian/xapiandbs/test: DatabaseNotFoundError: Couldn't stat '/home/runner/work/alaveteli/alaveteli/lib/acts_as_xapian/xapiandbs/test' (No such file or directory)
     # ./lib/acts_as_xapian/acts_as_xapian.rb:180:in `rescue in readable_init'
     # ./lib/acts_as_xapian/acts_as_xapian.rb:176:in `readable_init'
     # ./lib/acts_as_xapian/acts_as_xapian.rb:328:in `initialize_db'
     # ./lib/acts_as_xapian/acts_as_xapian.rb:521:in `initialize'
     # ./app/models/info_request.rb:1840:in `new'
     # ./app/models/info_request.rb:1840:in `search_events'
     # ./app/models/info_request.rb:609:in `request_list'
     # ./app/controllers/request_controller.rb:139:in `list'
     # ./app/controllers/application_controller.rb:131:in `record_memory'
     # ./spec/controllers/request_controller_spec.rb:49:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # IOError:
     #   DatabaseNotFoundError: Couldn't stat '/home/runner/work/alaveteli/alaveteli/lib/acts_as_xapian/xapiandbs/test' (No such file or directory)
     #   ./lib/acts_as_xapian/acts_as_xapian.rb:177:in `initialize'
@gbp gbp added bug Breaks expected functionality f:test-suite labels Feb 3, 2025
@gbp
Copy link
Member Author

gbp commented Feb 3, 2025

This should be a straightforward fix. Simply call update_xapian_index in a before each block should be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks expected functionality f:test-suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant