Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-387

Unit testing main methods is hard

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.0
    • None
    • container, yarn

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            criccomini Chris Riccomini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: