Skip to content

Commit 286f2f0

Browse files
committed
Fix all adapters running delayed_job_adapter_test
This file was introduced in de28930 because the Delayed Job JobWrapper includes an adapter specific method that logs job parameters. Since it was the first adapter specific test file, there was not previously any logic to only run some files for each adapter, so this file was included when running any adapter's tests. This commit excludes the delayed_job specific test file from all of the other adapter test tasks so that they do not require delayed_job and run these tests. de28930: de28930
1 parent 05dc093 commit 286f2f0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

activejob/Rakefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,19 @@ namespace :test do
3636
Rake::TestTask.new(adapter => "test:env:#{adapter}") do |t|
3737
t.description = "Run adapter tests for #{adapter}"
3838
t.libs << "test"
39-
t.test_files = FileList["test/cases/**/*_test.rb"]
39+
t.test_files = FileList["test/cases/**/*_test.rb"].reject {
40+
|x| x.include?("delayed_job") && adapter != "delayed_job"
41+
}
4042
t.verbose = true
4143
t.warning = true
4244
t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
4345
end
4446

4547
namespace :isolated do
4648
task adapter => "test:env:#{adapter}" do
47-
Dir.glob("#{__dir__}/test/cases/**/*_test.rb").all? do |file|
49+
Dir.glob("#{__dir__}/test/cases/**/*_test.rb").reject {
50+
|x| x.include?("delayed_job") && adapter != "delayed_job"
51+
}.all? do |file|
4852
sh(Gem.ruby, "-w", "-I#{__dir__}/lib", "-I#{__dir__}/test", file)
4953
end || raise("Failures")
5054
end

0 commit comments

Comments
 (0)