I have pretty simple queue system, which works on top of mongodb(findAndModify).
The scenario which I want to test is:
-
User starts background job and backend puts job into queue.
-
Worker(nodejs) picks up a job.
-
After some time worker dies(gracefully or not) and then restarts.
-
Worker will pick up the job and proceed.
-
The test condition is pretty simple - job should be done.
Worker is running inside docker container, tests are running outside of it. Is there any good way how to test this behavior?
Aucun commentaire:
Enregistrer un commentaire