samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
184 stars 124 forks source link

Move clean_repo before hook after :index_adapter #6846

Closed dlpierce closed 3 months ago

dlpierce commented 3 months ago

Summary

Fixes flakiness in by_format_spec.rb

Detailed Description

If an rspec example specified both :clean_repo and :index_adapter, the incorrect solr adapter would be cleaned leading to sporadic test failures.

Flakiness seen when spec/controllers/hyrax/file_sets_controller_spec.rb[1:1:1:4:1:1] ran prior to spec/services/hyrax/statistics/file_sets/by_format_spec.rb[1:1:1]

Changes proposed in this pull request:

@samvera/hyrax-code-reviewers

github-actions[bot] commented 3 months ago

Test Results

    17 files  ±0      17 suites  ±0   2h 18m 10s :stopwatch: -2s  6 704 tests ±0   6 407 :white_check_mark: +5  297 :zzz: ±0  0 :x:  - 5  13 175 runs  ±0  12 780 :white_check_mark: +5  395 :zzz: ±0  0 :x:  - 5 

Results for commit 0bebd230. ± Comparison against base commit d4e646c7.

This pull request removes 265 and adds 265 tests. Note that renamed tests count towards both. ``` spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 90fb19b8-68bd-459b-a4b5-9fab8060ec27 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 6273321f-27b1-49f0-b1fc-8785918b7503 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 031a2f29-6273-42cb-85b3-62ca8ccd9005 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 08c8b9f1-14db-4162-bb1e-52bdbe1b4ab1 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 5586af41-c78e-4c19-b991-071ab16f3e47 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 9506ac69-d58e-4e78-b739-14dc38101667 … ``` ``` spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: e9dfed1e-6aa5-409b-bb60-96c6c3d5612e spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 2d3e61a4-84ce-45fa-9c05-05e20a1f60d0 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: a44f55cf-75ff-4c8a-8115-3d5040c3b4f1 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: a77f5eb0-4def-4131-8acd-87caa8a2f8bf spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: e8f6d1f9-8d8f-40cf-9ec5-cf30e4dcc73d spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 5559facb-8cc3-443f-9bfb-541a316a4873 … ```