Lumiera  0.pre.03
»edit your freedom«
SubsystemRunner_test Class Reference

Description

Test:
managing start and stop of several dependent "subsystems" under various conditions.

Using mock-subsystems, which actually spawn a thread and finish by themselves and generally behave sane. For each such MockSys, we can define a behaviour pattern, e.g. weather the start succeeds and if the run terminates with error.

See also
lumiera::Subsys
lumiera::SubsystemRunner
lumiera::AppState
main.cpp

Definition at line 272 of file subsystem-runner-test.cpp.

Private Member Functions

void dependentSubsys_complete_cycle ()
 
void dependentSubsys_start_failure ()
 
virtual void run (Arg)
 
void singleSubsys_complete_cycle ()
 
void singleSubsys_emegency_exit ()
 
void singleSubsys_start_failure ()
 

Additional Inherited Members

- Public Member Functions inherited from Test
virtual void run (Arg arg)=0
 

Member Function Documentation

◆ singleSubsys_start_failure()

void singleSubsys_start_failure ( )
inlineprivate
Note
as this test focuses on the SubsystemRunner, the mock subsystem is implemented rather simplistic. Especially, there is a race when a subsystem is configured to "fail" – because in this case the starting context may go away before the remainder of the subsystem thread has executed after the sync() barrier. Especially in this case, no MockSys actually starts without failure, and thus the SubsystemRunner::wait() has no guarding effect. This can be considered a shortcoming of the test fixture; a well behaved subsystem won't just go away...

Definition at line 316 of file subsystem-runner-test.cpp.

+ Inheritance diagram for SubsystemRunner_test:
+ Collaboration diagram for SubsystemRunner_test:

The documentation for this class was generated from the following file: