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

🐛 Fix solr endpoint default issue #2179

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/hyrax/solr_service_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def reset!

Hyrax.index_adapter&.reset!
end

# Override Hyrax SolrService connection method to always use Hyku's connection method.
def connection
SolrEndpoint.new.connection
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/requests/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
WebMock.disable!
allow(AccountElevator).to receive(:switch!).with(cross_search_tenant_account.cname).and_return('public')
allow(Apartment::Tenant.adapter).to receive(:connect_to_new).and_return('')
allow_any_instance_of(Hyrax::SolrService).to receive(:connection).and_return(sample_solr_connection)
allow_any_instance_of(Hyrax::SolrServiceDecorator).to receive(:connection).and_return(sample_solr_connection)

Hyrax::SolrService.add(hyku_sample_work.to_solr)
Hyrax::SolrService.commit
Expand Down
Loading