Closed cristianbica closed 10 years ago
I'll update the .travis.yml once we have the integration tests for all adapters
@mperham I'm trying to get the sidekiq integration testing working but I don't have the time to dig into the sidekiq's internals. Can you help me with some sample code that will get any jobs from the queue and run them? thanks
There's no documented way to boot Sidekiq manually. NewRelic has some code here which they use for Sidekiq integration testing:
Thanks. I'll take a look. The aproach I used for these tests is to schedule jobs and then ask the adapter to run any pending jobs without forking or running any separate processes. Not sure it's the best way but I found some bugs :)
Extracted(#103) the fixes for some bugs found during developing this and I'm going to rewrite the integration testing. Too much black magic to run the jobs in the testing thread. I'll rewrite this to start a worker process for the adapter when the test starts and kill the worker when the tests finishes
Seems that we have an integration test suite that it's working :) cc @dhh
Awesome!
Created the basics to run the tests and implemented the delayed_jobs tests. The ways testing works is you schedule jobs, you ask the adapter to run the jobs and them make assertions. My first try was to start an actual adapter worker process but it's gets complicated and it will increase greatly the runtime. This is still WIP and I'll add more adapters as I find time and solutions to run the jobs (delayed_jobs is easier as it supports this built-in .. the
work_off
).