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

Add example endless workers #286

Merged
merged 1 commit into from
Dec 19, 2016

Conversation

mariokostelac
Copy link
Contributor

@mariokostelac mariokostelac commented Dec 13, 2016

Very often I need some worker to perform basic E2E test. This two workers should represent a worker that's doing IO (sleep) and workers that are CPU intensive (burning metal).
This should help us to:

  1. be confident that at least basic e2e flow works when we release a new version
  2. write integration tests if we want them (I'd say we do :))
  3. do harness testing by providing different environment variables and running shoryuken for long time.
  4. help iterating on issues like Log info message when processor dies gracefully #287 quite fast

@phstc
Copy link
Collaborator

phstc commented Dec 14, 2016

write integration tests if we want them (I'd say we do :))

We have one. You need SPEC_ALL=true rspec to run it.

How do you test these workers, you start them, then rake console and enqueue messages?

@mariokostelac
Copy link
Contributor Author

mariokostelac commented Dec 14, 2016

Yes, they're self-serving (creating messages for themselves). I mostly use them to be able to run shoryuken as a long-running process, test that manager dispatching works properly (or at least does not crash) etc. I do not feel strong about having them in the repo, but would simplify manual long-running testing.

@phstc
Copy link
Collaborator

phstc commented Dec 14, 2016

@mariokostelac got it! I don't mind having them in the repo if it's part of your testing workflow. But as they are under examples/ would mind to add a comment on top of them explaining it's for testing purposes? Just to avoid misleading people, otherwise they may think it's an example of implementing workers, WDYT? We could also have a specific folder for that, but I don't have strong opinions on that, up to you.

@mariokostelac
Copy link
Contributor Author

Maybe just putting them under test_workers/?

@phstc
Copy link
Collaborator

phstc commented Dec 15, 2016

@mariokostelac sounds good! :shipit:

@phstc phstc merged commit c71825c into ruby-shoryuken:master Dec 19, 2016
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

Successfully merging this pull request may close these issues.

2 participants