Mike Perham
b0107b5d99
Add JID for inline testing, fixes #1454
2014-01-30 09:22:07 -08:00
Mike Perham
b76ac9464c
Rejigger Sidekiq::Client to be instance-based, #1279
2013-10-23 21:49:37 -07:00
Ryan Schlesinger
fd0232eb15
Add dynamic testing
...
In addition to requiring 'sidekiq/testing' and 'sidekiq/testing/inline',
a user can also call the following methods to control the test harness:
Sidekiq::Testing.fake!
Sidekiq::Testing.inline!
Sidekiq::Testing.disable!
Each of the above methods also accepts a block to execute within that
context before reverting to the state present before method invocation.
To query the current state, use the following methods:
Sidekiq::Testing.enabled?
Sidekiq::Testing.disabled?
Sidekiq::Testing.fake?
Sidekiq::Testing.inline?
Closes #1053
2013-09-23 12:07:23 -07:00
Reinaldo Mello
d8c4c80d5d
Sets worker JID before performing job during tests
2013-07-02 11:43:59 -03:00
Mike Perham
919e3c7da9
More cleanup
2013-05-30 21:16:56 -07:00
awaw
9724c703ab
better formatting for readability
2013-05-31 02:59:57 +08:00
awaw
8e98314bc9
raise error upon empty queue
2013-05-31 02:39:01 +08:00
awaw
ad4a0b9c93
rename shift_and_perform to perform_one
2013-05-31 00:28:47 +08:00
awaw
4cfa817bfb
add testing method shift_and_perform
2013-05-30 13:06:08 +08:00
Mike Perham
07a2781ac0
Update sidekiq/testing to execute almost all of the client api, fixes #713
...
This should ensure tests reproduce a maximum amount of the implementation details that you'll see in production.
2013-03-27 21:24:47 -07:00
João Daniel
8dd3660646
fixing return for client_push in testing
2013-02-28 18:42:08 -03:00
João Daniel
c8e510d1af
return array position in testing push
2013-02-28 17:55:52 -03:00
Thibaud Guillaume-Gentil
d19af9c102
Ensure that all jobs are drained
...
Even when workers create new jobs when drained.
2012-11-01 15:49:35 +01:00
Samuel Cochran
2907777987
Add Worker clear_all and drain_all
2012-10-19 12:16:28 +08:00
Dimitrij Denissenko
8dbea0fbe1
DRY testing API
2012-06-28 08:46:18 +01:00
Mike Perham
de616bb188
Update testing to support scheduled API changes, fixes #218
2012-06-03 11:03:22 -07:00
Pan Thomakos
82c43d2447
Renamed perform to drain to match Rails 4 API.
2012-05-02 10:59:31 -07:00
Pan Thomakos
b9bfc03c68
Add perform method to workers in tests.
...
The `#perform` method allows workers to be execute all their previously
queued jobs at once.
2012-05-02 10:45:05 -07:00
Mike Perham
ff3417c381
delayed example for testing
2012-04-05 20:06:47 -07:00
Mike Perham
b210dd788c
Update Sidekiq logging to use standard Ruby logger
2012-02-14 09:00:26 -08:00
Mike Perham
a8226227c4
Update testing infrastructure
2012-02-10 20:30:14 -08:00
Mike Perham
69b00cfe50
Minimize annoying warnings
2012-02-09 22:33:36 -08:00
Mike Perham
f89eedf326
Add new sidekiq/testing feature.
...
This makes job processing synchronous when required.
2012-02-09 21:46:44 -08:00