Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ActiveSupport::SynchronousQueue doesn't have the drain method.

Now we are using teh SynchronousQueue in the test environment instead of
the TestQueue
  • Loading branch information...
commit a284b145dab008b097eb1046fd86aa9e6469fc25 1 parent 08f57bf
@rafaelfranca rafaelfranca authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 railties/test/application/queue_test.rb
View
8 railties/test/application/queue_test.rb
@@ -58,12 +58,12 @@ def ran?
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 the same thread" do
+ test "in test mode, an enqueued job will be processed in the same thread" do
app("test")
- Rails.queue.push ThreadTrackingJob.new
- job = Rails.queue.jobs.last
- Rails.queue.drain
+ job = ThreadTrackingJob.new
+ Rails.queue.push job
+ sleep 0.1
assert job.ran?, "Expected job to be run"
refute job.ran_in_different_thread?, "Expected job to run in the same thread"
Please sign in to comment.
Something went wrong with that request. Please try again.