Commit Graph

197 Commits

Author SHA1 Message Date
David Heinemeier Hansson
ad4935f127 Merge pull request #17817 from aripollak/hide-activejob-args
GlobalID objects are logged by their URI, not #inspect on the object, to prevent logging private data
2014-12-05 11:05:15 -02:00
Rafael Mendonça França
191ea4b85b Merge pull request #17825 from aripollak/fix-activejob-sidekiq-integration
Fix Sidekiq ActiveJob integration setup

Conflicts:
	activejob/test/support/integration/adapters/sidekiq.rb
2014-12-04 18:24:23 -02:00
Ari Pollak
25c8ea264e Only filter GIDable objects; remove cosmetic changes 2014-12-01 11:16:30 -05:00
Erik Michaels-Ober
d1374f99bf Pass symbol as an argument instead of a block 2014-11-29 11:53:24 +01:00
Ari Pollak
802630378e Hide potentially sensitive ActiveJob params from logs
* Show GlobalID instead of full object .inspect output
2014-11-28 22:20:50 -05:00
Ari Pollak
2fa4cbeebd Fix Sidekiq ActiveJob integration setup
* .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
2014-11-28 17:18:32 -05:00
Fábio Luiz Nery de Miranda
4f8eb78b1a Add perform_enqueued_jobs
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
2014-11-25 00:24:36 -02:00
Terry Meacham
11ab04b111 Added queue_name_delimiter attribute.
- Added ActiveJob::Base#queue_name_delimiter to allow for
  developers using ActiveJob to change the delimiter from the default
  ('_') to whatever else they may be using (e.g., '.', '-', ...).

- Updated source guide to include a blurb about the delimiter.
2014-10-26 21:46:05 -05:00
Yves Senn
2e38f83241 Merge pull request #17343 from vipulnsward/inline-aj-callbacks
Inline AJ around_perform and  around_enqueue in CallbackJob used for tests
2014-10-23 08:34:15 +02:00
Joe Lewis
8e12371da6 💅 fix typos in activejob queuing test 2014-10-22 06:33:10 -07:00
Vipul A M
588b39e1cd - Inline AJ around_perform and around_enqueue in CallbackJob used for tests. 2014-10-21 11:37:40 +05:30
Vipul A M
2965e1671d - Remove duplication in AJ logging test for setting logger.
- Remove un-needed require in AJ rescue test.
2014-10-20 12:38:11 +05:30
Vipul A M
c417311c4a No need to specify log level, run at log level as all other Rails components. 2014-10-20 12:36:44 +05:30
Vipul A M
8660853770 - Removed unused variable warnings from ActiveJob Adapters 2014-10-19 23:17:22 +05:30
Yves Senn
64e64c6f04 tests, move original_ var assignments outside of begin. 2014-10-10 08:55:17 +02:00
Blake Gentry
4a1dbba108 ActiveJob: allow blank queue names
As discussed in #17195, Que uses blank queue names by default for
performance reasons. At the very least, ActiveJob should allow users to
choose "" as their queue name. This commit allows blank queue names, as
well as tests to make sure that nil queue names still use the default.
2014-10-09 19:42:43 -07:00
Matthew Draper
d7a058f785 Make AJ integration tests much less verbose
In passing, avoid a blind retry in QC: instead, just fix the problem.
2014-09-27 21:59:10 +09:30
Jeremy Kemper
3f1d04e3bb Fix string/gid collision in job arguments
Serialize Global IDs as special objects, distinguishable from Strings
2014-09-25 10:00:19 -07:00
Yves Senn
017294066f Merge pull request #17005 from y-yagi/fix_aj_test_helper
add message to `assert` in `assert_enqueued_with`
2014-09-23 10:44:44 +02:00
yuuji.yaginuma
39bef5823f add message to assert in assert_enqueued_with 2014-09-23 08:50:32 +09:00
Jeremy Kemper
e3a65c6d7c Tighten up AJ::Arguments and its tests
* Disallow deserialization of non-primitive objects
* Broaden coverage; remove superfluous tests
2014-09-14 14:11:26 -07:00
Rafael Mendonça França
6c0adddccf Se the test order of activejob tests 2014-09-12 14:33:09 -03:00
Rafael Mendonça França
a7dbfcf532 Change gid calls to to_gid 2014-09-12 14:33:09 -03:00
Cristian Bica
175ba66664 ActiveJob Integration Tests 2014-09-11 00:38:56 +03:00
Cristian Bica
1e237b4e44 Active Job refactoring 2014-09-03 23:01:46 +03:00
Cristian Bica
56f992fe15 Fix for double ActiveJob::DeserializationErorr 2014-09-03 14:23:47 +03:00
Rafael Mendonça França
2e500e5c93 Merge pull request #16724 from seuros/testcase
[ActiveJob] TestCase
2014-09-02 11:31:08 -03:00
Abdelkader Boudih
d7add5352e [ActiveJob] TestCase (Will squash before merge) 2014-09-02 14:26:43 +00:00
Cristian Bica
5255e4f39f ActiveJob: Implemented enqueue_at for QueueClassic 2014-09-02 14:35:53 +03:00
Abdelkader Boudih
fccf3d0b63 [ActiveJob] TestCase 2014-09-02 07:50:16 +00:00
Abdelkader Boudih
eb4245dd17 [ActiveJob] TestCase 2014-09-02 07:50:16 +00:00
Robin Dupret
1da209fa9b Avoid skipping Sidekiq tests on Rubinius
Now that Travis provides support for Rubinius 2.2.10, we can run the
Sidekiq tests against this version.
2014-08-29 12:43:24 +02:00
Abdelkader Boudih
d56caea426 [ActiveJob] extract JobBuffer from helper 2014-08-29 08:50:09 +00:00
Cristian Bica
23329d33d4 Raise ActiveJob::SerializationError when cannot serialize job arguments 2014-08-24 16:01:58 +03:00
Nicholas Bruning
9b319a53fa Added enqueue_at support for QueAdapter in ActiveJob
* Added inline job runner for Que in test/support
* Updated QueAdapter to support enqueue_at
2014-08-21 04:27:30 +00:00
Abdelkader Boudih
68c643f8e7 [ActiveJob] Add queue_name_prefix so all queue are prefixed .
We can split queues on a per environement basis as well as seggregate per application so we can split queues on a per env basis

ActiveJob::Base.queue_name_prefix = 'foo'
2014-08-18 20:04:02 +00:00
Lucas Mazza
2f9179b4f4 Fix ActiveJob isolation tests. 2014-08-17 23:16:34 -03:00
Cristian Bica
3faa61ede5 [ActiveJob] raise DeserializationError when got an error deserializing 2014-08-17 23:10:45 +00:00
Abdelkader Boudih
931cfc4079 [ActiveJob] Fix tests for sucker_punch 2014-08-17 23:10:45 +00:00
Abdelkader Boudih
2f7b239fca [ActiveJob] Use globalid gem 2014-08-17 23:10:45 +00:00
Cristian Bica
788aee5acf Moved AR testing from using global variable to thread variable 2014-08-16 00:02:06 +03:00
Cristian Bica
94ae25ecd5 ActiveJob: Reworked queue_base_name as default_queue_name + Allow configure ActiveJob from app.config.active_job 2014-08-15 23:32:08 +03:00
Abdelkader Boudih
9b209603d0 Clean adapter_test.rb and skip test for sidekiq in unsupported rubies 2014-08-13 13:55:08 +00:00
Abdelkader Boudih
67f8b6b2bc Added ActionMailer::DeliverLater 2014-08-13 11:36:32 +00:00
Cristian Bica
3ed69cd5f5 Fixed failing tests; Load active_job in railtie; Renamed generator to job 2014-08-12 13:53:46 +03:00
Abdelkader Boudih
0c232779ec Remove activejob integration tests 2014-08-12 10:07:21 +00:00
Abdelkader Boudih
a75f085941 Add 'activejob/' from commit '14f74a8331f94150dfee653224de8fc837797709'
git-subtree-dir: activejob
git-subtree-mainline: b45b99894a60eda434abec94d133a1cfd8de2dda
git-subtree-split: 14f74a8331f94150dfee653224de8fc837797709
2014-08-12 09:17:19 +00:00