samsondav / rihanna

Rihanna is a high performance postgres-backed job queue for Elixir
MIT License
439 stars 47 forks source link

Not execute in test sandbox ? #75

Closed mydearxym closed 5 years ago

mydearxym commented 5 years ago

hi there ~

i have tried rihanna in my Elixir project, follow the config in README.md, but the job is not executed in ExUnit sandbox, is there sth i missing ?

image

image

there is no "work, work .." in console, how could i make it run in test env ?

also i am not sure if #59 facing the same problem


OS: mac 10.13.1 Rihanna version: latest Elixir version: latest(1.9.0) Phoenix version: latest

lpil commented 5 years ago

Jobs are not automatically run in the ecto sandbox by design (as you probably don't want side effecting jobs to run non-deterministically in your tests).

If you want to to run the jobs query the database for the data and manually run the jobs.

Personally I prefer to query the database and make assertions about what is in the queue and then to unit test the jobs seperately.