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
Mike Perham
babfdc96c5
Backport test suite to Minitest 4 so we can test against Rails 4.
2013-09-22 14:38:33 -07:00
Reinaldo Mello
d8c4c80d5d
Sets worker JID before performing job during tests
2013-07-02 11:43:59 -03:00
Mike Perham
4c07da687a
Fix heisenbug with tests
2013-06-25 21:09:04 -07:00
Mike Perham
ab1a2d567d
Clear old jobs to prevent heisen-failures.
2013-06-06 19:26:29 -07: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
db746b9bf8
use DirectWorker
2013-05-30 14:19:21 +08:00
awaw
d9ed81c341
no need to assert job result
2013-05-30 14:12:30 +08:00
awaw
4cfa817bfb
add testing method shift_and_perform
2013-05-30 13:06:08 +08:00
Mike Perham
4679c95f49
Upgrade to Minitest 5
2013-05-12 14:25:30 -07: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
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
Mike Perham
cdd23ae43e
Now with test!
2012-09-07 09:02:23 -07:00
Mike Perham
e55979407a
Add extension to delay any arbitrary class method to Sidekiq.
2012-08-16 16:43:01 -07: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
Pan Thomakos
c65d053808
Made sidekiq/testing work for the #enqueue method.
...
I also upgraded the testing tests so that they can be run in separate
`it` blocks. The trick is to use `load` instead of `require` which allows the
file to be re-executed.
2012-05-01 14:20:35 -07:00
jc00ke
22479118ec
Require sidekiq/rails for hook_rails! method
2012-04-27 22:27:02 -07:00
Mike Perham
d2263cbfe1
Add basic web testing, promote 'queues' set to core.
2012-03-10 13:07:19 -08:00
Mike Perham
0ced9e623e
Update delayed extensions to use perform_async so they are stubbed out by the testing infrastructure, fixes #77
2012-03-10 11:56:34 -08:00
Mike Perham
f9af66edd7
Rework redis connections so that the manager and
...
the client use separate pools.
This is so the Rails app Sidekiq::Client and
Sidekiq::Manager can use different configurations.
Also, fix issue where workers were not unregistered
in Redis upon shutdown.
2012-02-11 13:14:03 -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