Skip to content

Refactor stream master constructor

Afonso Mukai requested to merge refactor-stream-master-constructor into master

Created by: michele-brambilla

Description of work

With this PR the StreamMaster delegates a new object (the StreamerFactory) to construct the Streamers. Advantages:

  • StreamMaster is no more a template class
  • the AbstractStreamerFactory let us add stub Streamers that can be used to test the StreamMaster
  • the StreamerBase class implements all the public methods of the Streamer but pollAndProcess. This makes easier test the Streamer.

The StreamMaster constructor has changed. Some informations are now collected from MainOpt rather than constructor arguments.

The Streamer doesn't handle the sources list: a new object (the SourcesHandler) is in charge of doing that.

Acceptance Criteria

  • The StreamMaster can be constructed using different types of Streamer

Unit Tests

  • Added tests for the StreamerFactory
  • Added tests for the StreamMaster
  • Added tests for the SourceHandler

Code Review (To be filled in by the reviewer only)

  • Is the code of an acceptable quality?
  • Do the changes function as described and is it robust?

Nominate for Group Code Review (Anyone can nominate it)

Indicate if you think the code should be reviewed in a Thursday code review session.

  • Recommend for group code review

Also, nominate it on the code_review Slack channel (does someone want to automate this?).

Merge request reports