aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-09-18 20:00:16 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-09-18 20:00:16 -0300
commitfb0c845e92acfec771d9b6aca92585a957a5611f (patch)
tree378638695cf1e998e90ac03a657f0106e5ea629c /railties/test/application
parentaebbd4bb4d2bb5a461d5ec70dd27e5cb832d6869 (diff)
downloadrails-fb0c845e92acfec771d9b6aca92585a957a5611f.tar.gz
rails-fb0c845e92acfec771d9b6aca92585a957a5611f.tar.bz2
rails-fb0c845e92acfec771d9b6aca92585a957a5611f.zip
In development and test we drain the jobs in the same thread.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/queue_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/application/queue_test.rb b/railties/test/application/queue_test.rb
index 664001ca69..e67c6cc371 100644
--- a/railties/test/application/queue_test.rb
+++ b/railties/test/application/queue_test.rb
@@ -47,7 +47,7 @@ module ApplicationTests
end
end
- test "in development mode, an enqueued job will be processed in a separate thread" do
+ test "in development mode, an enqueued job will be processed in the same thread" do
app("development")
job = ThreadTrackingJob.new
@@ -55,10 +55,10 @@ module ApplicationTests
sleep 0.1
assert job.ran?, "Expected job to be run"
- assert job.ran_in_different_thread?, "Expected job to run in the same thread"
+ refute job.ran_in_different_thread?, "Expected job to run in the same thread"
end
- test "in test mode, explicitly draining the queue will process it in a separate thread" do
+ test "in test mode, explicitly draining the queue will process it in the same thread" do
app("test")
Rails.queue.push ThreadTrackingJob.new
@@ -66,7 +66,7 @@ module ApplicationTests
Rails.queue.drain
assert job.ran?, "Expected job to be run"
- assert job.ran_in_different_thread?, "Expected job to run in a different thread"
+ refute job.ran_in_different_thread?, "Expected job to run in the same thread"
end
class IdentifiableJob