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 270 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 ~Test ()=default
 this is an interface
 
lib::Random makeRandGen ()
 build a dedicated new RandomGen, seeded from the default-Gen
 
virtual void run (Arg arg)=0
 
void seedRand ()
 draw a new random seed from a common nucleus, and re-seed the default-Gen.
 
- Static Public Member Functions inherited from Test
static string firstTok (Arg)
 conveniently pick the first token from the argument line
 
static uint firstVal (Arg, uint=1)
 conveniently use some number given as argument, with optional default
 

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 315 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: