Fix failing import spec with seed 30239
This commit is contained in:
parent
89f182899f
commit
03afe9280d
|
@ -177,13 +177,10 @@ describe Jobs::Importer do
|
||||||
User.count.should == 0
|
User.count.should == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should indicate that an import is running when it starts" do
|
it "should indicate that an import is running" do
|
||||||
Import.expects(:set_import_started)
|
seq = sequence('call sequence')
|
||||||
Jobs::Importer.new.execute(@importer_args)
|
Import.expects(:set_import_started).in_sequence(seq).at_least_once
|
||||||
end
|
Import.expects(:set_import_is_not_running).in_sequence(seq).at_least_once
|
||||||
|
|
||||||
it "should indicate that an import is running when it's done" do
|
|
||||||
Import.expects(:set_import_is_not_running)
|
|
||||||
Jobs::Importer.new.execute(@importer_args)
|
Jobs::Importer.new.execute(@importer_args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -411,15 +408,12 @@ describe Jobs::Importer do
|
||||||
Jobs::Importer.any_instance.stubs(:load_table).returns( true )
|
Jobs::Importer.any_instance.stubs(:load_table).returns( true )
|
||||||
end
|
end
|
||||||
|
|
||||||
#TODO fails in order random, pending is failing on jenkins
|
it "should create the same indexes on the new tables" do
|
||||||
# it "should create the same indexes on the new tables" do
|
Jobs::Importer.any_instance.stubs(:ordered_models_for_import).returns([Topic])
|
||||||
# pending "Attention Neil: Fails under rspec --order rand:30239" do
|
expect {
|
||||||
# Jobs::Importer.any_instance.stubs(:ordered_models_for_import).returns([Topic])
|
Jobs::Importer.new.execute( @importer_args )
|
||||||
# expect {
|
}.to_not change{ Topic.exec_sql("SELECT indexname FROM pg_indexes WHERE tablename = 'topics' and schemaname = 'public';").map {|x| x['indexname']}.sort }
|
||||||
# Jobs::Importer.new.execute( @importer_args )
|
end
|
||||||
# }.to_not change{ Topic.exec_sql("SELECT indexname FROM pg_indexes WHERE tablename = 'topics' and schemaname = 'public';").map {|x| x['indexname']}.sort }
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
it "should create primary keys" do
|
it "should create primary keys" do
|
||||||
Jobs::Importer.any_instance.stubs(:ordered_models_for_import).returns([User])
|
Jobs::Importer.any_instance.stubs(:ordered_models_for_import).returns([User])
|
||||||
|
|
Loading…
Reference in New Issue