Last active
December 23, 2015 01:19
-
-
Save cjcolvar/6559565 to your computer and use it in GitHub Desktop.
Avalon test that should work, but leads to infinite loop resulting in tons of requests to solr and fedora and eventually times out.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'fedora_solr_sync_issues' do | |
describe 'master files no longer in fedora but still in solr' do | |
let!(:master_file) {FactoryGirl.create(:master_file)} | |
after do | |
ActiveFedora::SolrService.instance.conn.delete_by_id(master_file.pid) | |
ActiveFedora::SolrService.instance.conn.commit | |
end | |
it "should not go into an infinite loop" do | |
media_object = master_file.mediaobject | |
master_file.inner_object.delete | |
media_object.reload | |
#binding.pry | |
media_object.parts.should == [] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm wondering if the fact that association_collection resets @target to Array.new instead of nil as association_proxy does is the source of any problems.