fix intermittent parallel spec failures
closes #CNVS-7720 Change-Id: Ied1d01de4c9b3e993a943860a3e6789f5d92821c Reviewed-on: https://gerrit.instructure.com/23740 Tested-by: Jenkins <jenkins@instructure.com> Product-Review: Bryan Madsen <bryan@instructure.com> QA-Review: Bryan Madsen <bryan@instructure.com> Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
This commit is contained in:
parent
e923cfc078
commit
201a45b740
|
@ -1,12 +1,14 @@
|
|||
module ParallelExclude
|
||||
FILES = [
|
||||
"spec/integration/files_spec.rb",
|
||||
"spec/apis/v1/calendar_events_api_spec.rb",
|
||||
"spec/models/attachment_spec.rb",
|
||||
"spec/integration/files_spec.rb",
|
||||
"spec/models/media_object_spec.rb",
|
||||
"spec/lib/content_zipper_spec.rb",
|
||||
"vendor/plugins/respondus_lockdown_browser/spec_canvas/integration/respondus_ldb_spec.rb"
|
||||
"spec/lib/file_in_context_spec.rb",
|
||||
"vendor/plugins/respondus_lockdown_browser/spec_canvas/integration/respondus_ldb_spec.rb",
|
||||
"spec/models/attachment_spec.rb"
|
||||
]
|
||||
|
||||
test_files = FileList['vendor/plugins/*/spec_canvas/**/*_spec.rb'].exclude('vendor/plugins/*/spec_canvas/selenium/*_spec.rb') + FileList['spec/**/*_spec.rb'].exclude('spec/selenium/**/*_spec.rb')
|
||||
AVAILABLE_FILES = test_files.select { |file_name| FILES.include?(file_name) }
|
||||
AVAILABLE_FILES = FILES.select{|file_name| test_files.include?(file_name) }
|
||||
end
|
||||
|
|
|
@ -226,8 +226,7 @@ describe Canvas::Migration::Helpers::SelectiveContentFormatter do
|
|||
res[0][:title].should == 'course files'
|
||||
res[0][:sub_items][0][:title].should == 'a5.html'
|
||||
res[1][:title].should == 'course files/a'
|
||||
res[1][:sub_items][0][:title].should == 'a1.html'
|
||||
res[1][:sub_items][1][:title].should == 'a2.html'
|
||||
res[1][:sub_items].map{|item| item[:title]}.sort.should == ['a1.html', 'a2.html']
|
||||
res[2][:title].should == 'course files/a/b'
|
||||
res[2][:sub_items][0][:title].should == 'a3.html'
|
||||
res[3][:title].should == 'course files/a/b/c'
|
||||
|
|
|
@ -35,11 +35,12 @@ describe FileInContext do
|
|||
# to test S3), we fake out just the part we care about. Also, we can't use Mocha because we need the
|
||||
# argument of the method. This will be fixed when we've refactored Attachment to allow dynamically
|
||||
# switching between S3 and local.
|
||||
unbound_method = Attachment.instance_method(:filename=)
|
||||
class Attachment; def filename=(new_name); write_attribute :filename, sanitize_filename(new_name); end; end
|
||||
filename = File.expand_path(File.join(File.dirname(__FILE__), %w(.. fixtures files escaping_test[0].txt)))
|
||||
attachment = FileInContext.attach(@course, filename, nil, @folder)
|
||||
attachment.filename.should == 'escaping_test%5B0%5D.txt'
|
||||
class Attachment; undef_method :filename=; end
|
||||
Attachment.send(:define_method, :filename=, unbound_method)
|
||||
end
|
||||
|
||||
it "should close the temp file" do
|
||||
|
|
Loading…
Reference in New Issue