Lumiera  0.pre.03
»edit your freedom«
subsystem-runner-test.cpp File Reference

Go to the source code of this file.

Description

The SubsystemRunner_test performs various scenarios regarding start, stop and failure of Subsystems. Its primary purpose is to cover the SubsystemRunner.

Definition in file subsystem-runner-test.cpp.

#include "lib/test/run.hpp"
#include "lib/test/test-helper.hpp"
#include "common/subsys.hpp"
#include "common/subsystem-runner.hpp"
#include "common/option.hpp"
#include "lib/symbol.hpp"
#include "lib/thread.hpp"
#include "lib/sync-barrier.hpp"
#include "lib/query-util.hpp"
#include "lib/format-cout.hpp"
#include "lib/error.hpp"
#include "lib/util.hpp"
#include "lib/sync.hpp"
#include <memory>
#include <atomic>
#include <chrono>

Classes

class  MockSys
 A simulated "Lumiera Subsystem". More...
 
class  SubsystemRunner_test
 

Functions

 LAUNCHER (SubsystemRunner_test, "function common")
 Register this test class... More...
 
 LUMIERA_ERROR_DEFINE (TEST, "simulated failure.")
 marker for simulated failure exceptions
 

Variables

const uint DELAY_FOR_FLOUNDERING_THRAD_ms = 20
 due to a shortcoming of this test fixture, a floundering subsystem continues to run for a short time after the sync barrier. More...
 
lib::Cmdline dummyArgs ("")
 dummy options just to be ignored
 
lumiera::Option dummyOpt (dummyArgs)
 
const uint MAX_RUNNING_TIME_ms = 80
 limit for the randomly selected duration of subsystem's running phase (milliseconds)
 
const uint MIN_RUNNING_TIME_ms = 20
 
const uint TICK_DURATION_ms = 5
 the "running" subsystem checks for a shutdown request every XX milliseconds
 

Namespaces

 lumiera
 Lumiera public interface.
 

Function Documentation

◆ LAUNCHER()

lumiera::test::LAUNCHER ( SubsystemRunner_test  ,
"function common"   
)

Register this test class...