workflows: hotfix unittest

* Improves tests stability.

* Simplifies workflow engine.

* Fixes the endlessy working workflow engine bug.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
1:D100: Docstring missing
25:D401: First line should be imperative: 'Run', not 'Runs'
25:D205: Blank line missing between one-line summary and description
46:D401: First line should be imperative: 'Restart', not 'Restarts'
46:D400: First line should end with '.', not 't'
46:D205: Blank line missing between one-line summary and description
91:D401: First line should be imperative: 'Restart', not 'Restarts'
119:D401: First line should be imperative: 'Wrap', not 'Wraps'
119:D400: First line should end with '.', not 't'
119:D205: Blank line missing between one-line summary and description
164:D400: First line should end with '.', not 'e'
164:D205: Blank line missing between one-line summary and description