You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Chris Riccomini (JIRA)" <ji...@apache.org> on 2014/08/19 23:03:19 UTC
[jira] [Created] (SAMZA-387) Unit testing main methods is hard
Chris Riccomini created SAMZA-387:
-------------------------------------
Summary: Unit testing main methods is hard
Key: SAMZA-387
URL: https://issues.apache.org/jira/browse/SAMZA-387
Project: Samza
Issue Type: Bug
Components: container, yarn
Affects Versions: 0.8.0
Reporter: Chris Riccomini
Both SamzaAppMaster and SamzaContainer are hard to unit test. I ran into this as part of SAMZA-382, but it's a recurring problem. The issue is that we have a lot of logic in the main() method that's not mockable.
I think a good solution would be to write a helper class for things like environment variable, JmxServer, etc, and manage them all cleanly in an object that we can test, rather than in the main() method.
--
This message was sent by Atlassian JIRA
(v6.2#6252)