aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-10-17 17:56:59 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-10-19 07:45:47 +0900
commit096cb88ce7838472c09e87feb7092c30ad21f7f3 (patch)
treeb7f5bd5bd468816a129857e05838817d9184c64e /activejob
parentb0f3070209499474d139ad46336eda9c57c16e88 (diff)
downloadrails-096cb88ce7838472c09e87feb7092c30ad21f7f3.tar.gz
rails-096cb88ce7838472c09e87feb7092c30ad21f7f3.tar.bz2
rails-096cb88ce7838472c09e87feb7092c30ad21f7f3.zip
Return a non zero code when can not connect to backend on CI
Diffstat (limited to 'activejob')
-rw-r--r--activejob/test/support/integration/adapters/backburner.rb3
-rw-r--r--activejob/test/support/integration/adapters/que.rb3
-rw-r--r--activejob/test/support/integration/adapters/queue_classic.rb3
-rw-r--r--activejob/test/support/integration/adapters/sneakers.rb3
4 files changed, 8 insertions, 4 deletions
diff --git a/activejob/test/support/integration/adapters/backburner.rb b/activejob/test/support/integration/adapters/backburner.rb
index eb179011d9..1163ae8178 100644
--- a/activejob/test/support/integration/adapters/backburner.rb
+++ b/activejob/test/support/integration/adapters/backburner.rb
@@ -8,7 +8,8 @@ module BackburnerJobsManager
end
unless can_run?
puts "Cannot run integration tests for backburner. To be able to run integration tests for backburner you need to install and start beanstalkd.\n"
- exit
+ status = ENV["CI"] ? false : true
+ exit status
end
end
diff --git a/activejob/test/support/integration/adapters/que.rb b/activejob/test/support/integration/adapters/que.rb
index 2e7d327b37..f231e5e12d 100644
--- a/activejob/test/support/integration/adapters/que.rb
+++ b/activejob/test/support/integration/adapters/que.rb
@@ -32,7 +32,8 @@ module QueJobsManager
rescue Sequel::DatabaseConnectionError
puts "Cannot run integration tests for que. To be able to run integration tests for que you need to install and start postgresql.\n"
- exit
+ status = ENV["CI"] ? false : true
+ exit status
end
def stop_workers
diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb
index dbbdc12b9d..2b5375461a 100644
--- a/activejob/test/support/integration/adapters/queue_classic.rb
+++ b/activejob/test/support/integration/adapters/queue_classic.rb
@@ -30,7 +30,8 @@ module QueueClassicJobsManager
rescue PG::ConnectionBad
puts "Cannot run integration tests for queue_classic. To be able to run integration tests for queue_classic you need to install and start postgresql.\n"
- exit
+ status = ENV["CI"] ? false : true
+ exit status
end
def stop_workers
diff --git a/activejob/test/support/integration/adapters/sneakers.rb b/activejob/test/support/integration/adapters/sneakers.rb
index 965e6e2e6c..9af1619d8b 100644
--- a/activejob/test/support/integration/adapters/sneakers.rb
+++ b/activejob/test/support/integration/adapters/sneakers.rb
@@ -29,7 +29,8 @@ module SneakersJobsManager
log: Rails.root.join("log/sneakers.log").to_s
unless can_run?
puts "Cannot run integration tests for sneakers. To be able to run integration tests for sneakers you need to install and start rabbitmq.\n"
- exit
+ status = ENV["CI"] ? false : true
+ exit status
end
end