aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test
Commit message (Collapse)AuthorAgeFilesLines
* Include JobID in all ActiveJob info logsBolek Kurowski2017-02-221-6/+6
| | | | | | | | | | Currently we provide the Job ID in logs only related to enqueuing a job. This adds the job id to the remaining ActiveJob logs when: - a job started performing - a job ended performing Providing the job id in those logs will ease searching logs by job id.
* remove `ActiveSupport.halt_callback_chains_on_return_false` from everywhereyuuji.yaginuma2017-02-081-1/+0
|
* correctly set test adapter when configure the queue adapter on a per job ↵Yuji Yaginuma2017-01-313-0/+21
| | | | | | | | | | | | (#26690) The `ActiveJob::TestHelper` replace the adapter to test adapter in `before_setup`. It gets the target class using the `descendants`, but if the test target job class is not loaded, will not be a replacement of the adapter. Therefore, instead of replacing with `before_setup`, modified to replace when setting adapter. Fixes #26360
* Append skipped jobs to enqueued_jobsAlexander Pauly2017-01-311-0/+11
| | | | | | | | | | Refactored ActiveJob TestAdapter Updated ActiveJob changelog Fixed typo in changelog Fixed formatting issue in changelog
* make backburner integration test to workyuuji.yaginuma2017-01-281-2/+2
| | | | | | | | | | | | | Currently, backburner integration test is not running on CI. https://travis-ci.org/rails/rails/jobs/196005322#L610 Using `Backburner::Worker.connection` to check whether beanstalkd is running. But `Backburner::Worker.connection` was removed in backburner 1.2.0. https://github.com/nesquena/backburner/commit/81fde499c2263abe8dedee59a3d0e03e92d72627 Therefore, this check process always becomes false, so the test is no longer done. I fixed it so that check processing is done correctly.
* assert_enqueued_jobs with queue optionMichael Elfassy2017-01-181-0/+21
|
* `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-053-3/+3
| | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* remove useless importSnowmanzzz(Zhengzhong Zhao)2016-12-301-2/+0
|
* "Use assert_nil if expecting nil. This will fail in minitest 6."Akira Matsuda2016-12-252-3/+3
|
* Privatize unneededly protected methods in Active Job testsAkira Matsuda2016-12-242-2/+2
|
* Output adapter being tested.utilum2016-12-121-0/+1
|
* Avoid race condition in AJ integration testsMatthew Draper2016-11-302-1/+3
| | | | Make sure the file doesn't exist until we've finished writing it.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-2910-15/+15
|
* removes requires already present in active_support/railsXavier Noria2016-10-271-1/+0
|
* Uses queue adapter_method instead of ActiveJob::Base.queue_adapterGabi Stefanini2016-10-241-2/+2
| | | | Change ActiveJob::Base.queue_adapter to use queue_adapter method to make test code consistent.
* Removed deprecated support to passing the adapter class to .queue_adapterRafael Mendonça França2016-10-101-13/+0
|
* use `descendants` to get class that inherited `ActiveJob::Base`yuuji.yaginuma2016-09-053-0/+16
| | | | | | `subclasses` get only child classes. Therefore, if create a job common parent class as `ApplicationJob`, inherited class does not get properly.
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-011-1/+1
|
* 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.
* Yield the job instance so you have access to things like `job.arguments` on ↵David Heinemeier Hansson2016-08-162-3/+3
| | | | the custom logic after retries fail
* Add three new rubocop rulesRafael Mendonça França2016-08-161-7/+7
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* code gardening: removes redundant selfsXavier Noria2016-08-082-2/+2
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-073-4/+0
|
* applies remaining conventions across the projectXavier Noria2016-08-063-3/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-0610-24/+18
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-3/+2
|
* modernizes hash syntax in activejobXavier Noria2016-08-063-12/+12
|
* applies new string literal convention in activejob/testXavier Noria2016-08-0647-279/+279
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix tests against ActiveSupport::DurationsDavid Heinemeier Hansson2016-08-022-28/+47
|
* Please RubocupDavid Heinemeier Hansson2016-08-021-2/+2
|
* Not neededDavid Heinemeier Hansson2016-08-011-1/+0
|
* Allow for custom handling of exceptions that persist beyond the retry attemptsDavid Heinemeier Hansson2016-08-012-0/+7
|
* Add exponentially_longer and custom wait algorithmsDavid Heinemeier Hansson2016-08-012-0/+43
|
* Use descriptive exception namesDavid Heinemeier Hansson2016-08-012-20/+20
|
* Reraise instead of swallow exceptions that occur beyond the retry attemptsDavid Heinemeier Hansson2016-07-291-1/+1
|
* Satisfy pedantic rubocop whitespace detectionDavid Heinemeier Hansson2016-07-291-4/+4
|
* Add retry_on/discard_on for better exception handlingDavid Heinemeier Hansson2016-07-292-0/+68
|
* Fix accessing provider_job_id inside active jobs for sidekiq adapterAzzurrio2016-07-282-0/+16
|
* Fix AJ tests on ruby 2.4 being causes since classes are unified for Integer, ↵Vipul A M2016-07-091-1/+1
| | | | and we create test name nased on arg class. Append ar as well to the test name
* Fix jobs overriding AJ::Base#loggerJean Boussier2016-06-172-1/+15
|
* Provide the ability to override the queue adapter used by jobs underSteve Lounsbury2016-06-111-0/+12
| | | | | | | | | | | | | test. This PR adds a method called `queue_adapter_for_test` to `ActiveJob::TestHelper`. This method is expected to provide the queue adapter to be used for jobs under test. It maintains the current behaviour by defaulting to an instance of `ActiveJob::QueueAdapter::TestAdapter`. Tests that include `ActiveJob::TestHelper` or extend from `ActiveJob::TestCase` can provide a custom queue adapter by overriding `queue_adapter_for_test` in their class.
* Chomp: prefer String#chomp where we can for a clarity boostlvl0nax2016-04-291-1/+3
| | | | | | Closes #24766, #24767 Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* Added more tests for reserved hash keys of ActiveJob::Arguments.Santosh Wadghule2016-03-171-6/+7
| | | | | | - Added tests for checking all reserved hash keys of ActiveJob::Arguments. - Moved unrelated code from the test to the correct place, i.e. newly created test.
* Add JSON round trip verification testcaseMike Perham2016-03-091-1/+16
|
* Job payload should be symmetric across JSON dump/loadMike Perham2016-03-091-3/+3
| | | Placing non-native JSON data types, like symbols, in the hash to serialize means that the deserialize method will return something different from what was serialized, a common bug and source of frustration for devs.
* Merge pull request #23932 from arthurnn/arthurnn/remove_load_pathsArthur Nogueira Neves2016-03-011-2/+0
|\ | | | | Remove load_paths file
| * Remove load_paths fileArthur Neves2016-02-271-2/+0
| |
* | Merge pull request #23966 from ↵Jeremy Daer2016-03-014-48/+5
|\ \ | | | | | | | | | | | | jeremy/activejob/pare-down-async-adapter-for-low-footprint-dev Active Job: pare down async adapter for low footprint dev
| * | Active Job: smaller footprint for the dev/test async adapterJeremy Daer2016-02-294-48/+5
| |/ | | | | | | | | Use one shared worker pool for all queues with 0-#CPU workers rather than separate pools per queue with 2-10*#CPU workers each.
* / - Updating the dummy app template to have rails_command instead of rakeMohit Natoo2016-03-011-1/+1
|/