Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not execute in test sandbox ? #75

Closed
mydearxym opened this issue Jul 10, 2019 · 1 comment
Closed

Not execute in test sandbox ? #75

mydearxym opened this issue Jul 10, 2019 · 1 comment

Comments

@mydearxym
Copy link

mydearxym commented Jul 10, 2019

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

mydearxym added a commit to coderplanets/coderplanets_server that referenced this issue Jul 11, 2019
mydearxym added a commit to coderplanets/coderplanets_server that referenced this issue Jul 11, 2019
@lpil
Copy link
Collaborator

lpil commented Jul 11, 2019

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.

@lpil lpil closed this as completed Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants