aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/integration
Commit message (Collapse)AuthorAgeFilesLines
* Added instance variable `@queue` to JobWrapper.InJung Chung2016-08-191-0/+7
| | | | | This will fix issues in [resque-scheduler](https://github.com/resque/resque-scheduler) `#job_to_hash` method, so we can use `#enqueue_delayed_selection`, `#remove_delayed` method in resque-scheduler smoothly.
* applies new string literal convention in activejob/testXavier Noria2016-08-061-20/+20
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix accessing provider_job_id inside active jobs for sidekiq adapterAzzurrio2016-07-281-0/+9
|
* Active Job: smaller footprint for the dev/test async adapterJeremy Daer2016-02-291-2/+2
| | | | | Use one shared worker pool for all queues with 0-#CPU workers rather than separate pools per queue with 2-10*#CPU workers each.
* Fix race condition testing for job execution orderWill Jessop2015-11-231-1/+1
| | | | | | | | | | | | | | | On most filesystems file ctime is limited to 1 second granularity, which means that on faster computers multiple simple jobs (for instance dummy TestJob) can finish within the same second. The execution order test in ActiveJob integration tests relies on multiple TestJobs writing files then comparing the ctime. As a result integration tests would sometimes fail as the ctime of the files written by these TestJobs could have coincidental ctimes making the comparison for job order fail. This commit adds a far more precise execution time (to the extent that the Ruby Time class allows) to the file created by TestJob, and updates the execution order assertion to use it, removing the race condition.
* Add job priorities to ActiveJobwvengen2015-09-171-0/+12
|
* Initial implementation of ActiveJob AsyncAdapter.Jerry D'Antonio2015-08-251-1/+1
|
* implement `provider_job_id` for `queue_classic`.Yves Senn2015-08-131-2/+2
| | | | | | The latest, currently unreleased, version of queue_classic is required for this to work. See https://github.com/QueueClassic/queue_classic/pull/262 for more details.
* use `assert_not` instead of `refute` as mentioned in our guides.Yves Senn2015-08-131-3/+2
| | | | | | | | | | | As described in the "Follow Coding Conventions" section in our contribution guide (http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions) we favor `assert_not` over `refute`. While we don't usually make stylistic changes on it's own I opted to do it in this case. The reason being that test cases are usually copied as a starting point for new tests. This results in a spread of `refute` in files that have been using it already.
* Fixes #20799Johannes Opper2015-08-041-0/+17
| | | | | | | | | | | | | | | | | | | | | | When `#perform_later` is called the locale isn't stored on the queue, which results in a locale reset when the job is performed. An example of the problem: I18n.locale = 'de' HelloJob.perform_now # german message, correct but I18n.locale = 'de' HelloJob.perform_later # english message, incorrect This PR attaches the current I18n.locale to every job during the serialization process. It is then restored during deserialization and used to perform the job with the correct locale. It falls back to the default locale if no serialized locale is found in order to provide backward compatibility with previously stored jobs. It is not necessary to clear the queue for the update.
* Provide provider_job_id to qu adapter.Kevin Deisz2015-05-071-5/+8
| | | | Further work to provide provider_job_id for queue adapters.
* Make que report back its job_id to provider_job_idJeroen van Baarsen2015-05-071-10/+4
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Let Sidekiq set provider_job_idJeroen van Baarsen2015-05-071-0/+10
| | | | | | | | | | When a job is added to Sidekiq by ActiveJob, make sure we still can get the original job_id provider by Sidekiq. We do this by adding the sidekiq jid to provider_job_id field on the job object. Partly fixes #18821 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Get provider_job_id from DelayedJobKevin Deisz2015-05-051-0/+6
| | | | | When queueing with DelayedJob, get the id of the job instance and report it back to ActiveJob as provider_job_id.
* Do not use named queues for que adapterRafael Mendonça França2015-05-031-1/+1
| | | | See #19498
* Queue Classic runs a second earlier than scheduledMatthew Draper2015-04-231-1/+1
| | | | | | | That seems to be a bug, but as we don't actually care about the precision for our test, we'll just give it a bit longer. [Matthew Draper & Cristian Bica]
* Fix sidekiq test order dependencyMatthew Draper2015-04-201-2/+0
| | | | | | | | Requiring sidekiq/testing changes stuff, so we need to counteract that after we do so. And given its potential to confuse things, let's do it up front, at a predictable point.
* Pass wrapped class name to Sidekiq for logging purposesMike Perham2015-03-231-0/+13
| | | | | | | Sidekiq logs the name of the job class being performed. Because ActiveJob wraps the class, this means every job logs as an AJ::JobWrapper instead of the actual class name. Will help fix mperham/sidekiq#2248
* :nail_care: fix typos in activejob queuing testJoe Lewis2014-10-221-2/+2
|
* tests, move `original_` var assignments outside of `begin`.Yves Senn2014-10-101-2/+3
|
* ActiveJob Integration TestsCristian Bica2014-09-111-0/+46