Skip to content

Reinstate status reports

Created by: mattclarke

Issue

DM-1800 DM-1804 (partial)

Description of work

Okay, where to begin...

This adds back in status reporting - I basically copied what was done for the Forwarder (https://github.com/ess-dmsc/forward-epics-to-kafka/pull/313) and modified it appropriately. See StatusReporterBase, StatusReporter and StatusReporterTests.

After putting the reporting back into Master I wanted to improve the testing in Master. I tried a number of things, but finally ended up taking the "run loop" out of Master and into kafka-to-nexus.cpp which made it easier to test (and inadvertently partially fixed DM-1804). During this messing around process, I also started using "variant" for recording the state of the filewriting and state transitions. I think this works nicely, so didn't take it back out. It is a bit controversial so I can undo it if it is unpopular. Removing the option to supply a writing command from the CLI was done because it was making it hard to test Master. Changing Master to be an NVI meant MasterInterface was no longer required.

The key functionality changes are in StatusReporterBase, StatusReporter, StatusReporterTests, Master, MasterTests and kafka-to-nexus.cpp.

The rest is superficial (e.g. name changes, moving stuff etc.):

  • moved StreamerStatus out of the Status namespace
  • Tidied up some forward declarations
  • Moved MockProducer into a header file, so it could be used in other tests

Oh yeah, and the system tests are all back!

Nominate for Group Code Review

  • Nominate for code review

Merge request reports