| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Since `ActiveJob::TestHelper` globally sets
`ActiveJob::Base.queue_adapter` on setup, there is no benefit in
instantiating a new `TestAdapter` per tests. The original rationale was
to allow parallel tests to run without interference, but since they'd
all mutate the global `ActiveJob::Base.queue_adapter`, that was never
realized.
|
|
|
|
|
|
|
| |
* This allows for easier reading, since those are two words, so they should be
split by _
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type.
This allows specific jobs to be tested, while preventing others from
being performed unnecessarily.
Example:
def test_hello_job
assert_performed_jobs 1, only: HelloJob do
HelloJob.perform_later('jeremy')
LoggingJob.perform_later
end
end
An array may also be specified, to support testing multiple jobs.
Example:
def test_hello_and_logging_jobs
assert_nothing_raised do
assert_performed_jobs 2, only: [HelloJob, LoggingJob] do
HelloJob.perform_later('jeremy')
LoggingJob.perform_later('stewie')
RescueJob.perform_later('david')
end
end
end
Fixes #18802.
Trim space and document :only option.
|
|
|
|
| |
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, the HashWithIndifferent access approach is insufficient
for our needs. It's perfectly reasonable to want to use keyword
arguments with Active Job, which we will see as a symbol keyed hash. For
Ruby to convert this back to keyword arguments, it must deserialize to a
symbol keyed hash.
There are two primary changes to the serialization behavior. We first
treat a HWIA separately, and mark it as such so we can convert it back
into a HWIA during deserialization.
For normal hashes, we keep a list of all symbol keys, and convert them
back to symbol keys after deserialization.
Fixes #18741.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
With the option, assert_enqueued_jobs will check the number of times a specific kind of job is enqueued.
|
| |
|
| |
|
|\
| |
| | |
Update copyright notices to 2015 [ci skip]
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Indent the list content by 4 spaces instead of 2 to match the other
changelog files. Also wrap the lines around 80 chars.
Finally update the documentation example with nit-picky things.
|
|\ \
| | |
| | | |
Fixed typo in ActiveJob CHANGELOG [ci skip]
|
| |/ |
|
|\ \
| |/
|/| |
Fix spell life cycle on activejob docs [ci skip]
|
| | |
|
| | |
|
|\ \
| | |
| | | |
ActiveJob testing improvements
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. The :test adapter wasn't going through a full cycle of
serialize/deserialize when performing jobs. Now it does
2. Regular AJ tests were not run for the :test adapter. Now they are
3. ActiveJob::TestHelper uses assert_valid_keys but doesn’t requires
the file that implements that method. Now it does
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| | |
Stems from [this comment](https://github.com/rails/rails/pull/18203#issuecomment-68138096) by @robin850
and by the blog post http://weblog.rubyonrails.org/2014/12/19/Rails-4-2-final
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ActiveJob::Arguments uses Hash#with_indifferent_access.
But, activejob gem does not require Hash extension library.
When we use activejob as standalone,
we need extra require statement. This is unhandy.
This commit fixes it.
|
| |
| |
| |
| |
| | |
No need to point links to http://guides.rubyonrails.org/v4.2.0/... now
that the Ruby on Rails guides point to 4.2.0.
|
| |
| |
| |
| | |
Use redis protocol
|
| | |
|
|\ \
| | |
| | | |
GlobalID objects are logged by their URI, not #inspect on the object, to prevent logging private data
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
* Show GlobalID instead of full object .inspect output
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix Sidekiq ActiveJob integration setup
Conflicts:
activejob/test/support/integration/adapters/sidekiq.rb
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
* .connect on a Redis connection wasn't valid
* Reset logger after we're done testing for redis connection to avoid
"closed stream" error when starting server for real from a fork
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[This article](http://weblog.rubyonrails.org/2014/8/20/Rails-4-2-beta1/#maintenance-consequences-and-rails-5-0) states that:
> Rails 5.0 is in most likelihood going to target Ruby 2.2.
Before the exact minimum version is fully decided, @arthurnn [suggests](https://github.com/rails/rails/pull/17830#issuecomment-64940383)
that **at least** version 2.1.0 **must** be required by the `gemspec` files.
|
|/ /
| |
| |
| |
| |
| |
| | |
We will support only Ruby >= 2.1.
But right now we don't accept pull requests with syntax changes to drop
support to Ruby 1.9.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It will set proper queue_adapter state required by assert_performed_jobs assertions.
Also the block version of assert_performed_jobs will make sure this
state is respected.
Fixes #17684
|
| | |
|
| | |
|
| |
| |
| |
| | |
From dc5854f and c07c0b2 [ci skip]
|
| | |
|
| | |
|
| | |
|
| | |
|