Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
SessionCommandFunction_test Class Reference

Description

Test:
verify integrated functionality of command dispatch through the SessionCommand facade.
  • operate lifecycle of the supporting components, similar to activating the »session subsystem«
  • generate command messages similar to what is received from the UI-Bus
  • us the handler mechanism from stage::ctrl::CoreService to talk to the facade
  • have a specially rigged command function to observe invocation
  • wait for the session loop thread to dispatch this command
  • verify that commands are really executed single-threaded
See also
steam::SessionSubsystem
SteamDispatcher
CommandQueue_test
AbstractTangible_test::invokeCommand()

Definition at line 186 of file session-command-function-test.cpp.

Public Attributes

bool thread_has_ended {false}
 

Public Member Functions

 SessionCommandFunction_test ()
 
 ~SessionCommandFunction_test ()
 
virtual void run (Arg args_for_stresstest)
 
void startDispatcher ()
 
void stopDispatcher ()
 
void perform_simpleInvocation ()
 
void perform_messageInvocation ()
 
void perform_massivelyParallel (Arg args_for_stresstest)
 

Constructor & Destructor Documentation

◆ SessionCommandFunction_test()

Definition at line 191 of file session-command-function-test.cpp.

References CommandDef::operation(), and Command::storeDef().

+ Here is the call graph for this function:

◆ ~SessionCommandFunction_test()

Definition at line 201 of file session-command-function-test.cpp.

References Command::remove().

+ Here is the call graph for this function:

Member Function Documentation

◆ run()

◆ startDispatcher()

void startDispatcher ( )
inline
Test:
start the session loop thread, similar to what the »session subsystem« does
Note
we are not actually starting the subsystem itself, but we indeed start the »session loop thread«
See also
facade.cpp

Definition at line 233 of file session-command-function-test.cpp.

References SteamDispatcher::instance, and SessionCommandFunction_test::thread_has_ended.

Referenced by SessionCommandFunction_test::run().

+ Here is the caller graph for this function:

◆ stopDispatcher()

void stopDispatcher ( )
inline
Test:
verify the »session loop thread« has finished properly

Definition at line 251 of file session-command-function-test.cpp.

References __DELAY__, SteamDispatcher::instance, and SessionCommandFunction_test::thread_has_ended.

Referenced by SessionCommandFunction_test::run().

+ Here is the caller graph for this function:

◆ perform_simpleInvocation()

void perform_simpleInvocation ( )
inline
Test:
demonstrate a simple direct invocation

Definition at line 264 of file session-command-function-test.cpp.

References __DELAY__, and SessionCommand::facade.

Referenced by SessionCommandFunction_test::run().

+ Here is the caller graph for this function:

◆ perform_messageInvocation()

void perform_messageInvocation ( )
inline
Test:
invoke a command in the same way as CoreService does when handling command messages from the UI-Bus
  • build a command message, similar to what the generic UI element does
  • use the contents of this message at the SessionCommand facade, similar to what CoreService does

Definition at line 291 of file session-command-function-test.cpp.

References __DELAY__, Command::canExec(), and SessionCommand::facade.

Referenced by SessionCommandFunction_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ perform_massivelyParallel()

void perform_massivelyParallel ( Arg  args_for_stresstest)
inline
Test:
massively multithreaded torture test to verify that commands are properly enqueued and executed one by one
  • create several threads to send random command messages
  • verify that, after executing all commands, the internal state variable reflects the result of a proper sequential calculation and summation

Definition at line 316 of file session-command-function-test.cpp.

References __DELAY__, cStr(), SteamDispatcher::instance, ThreadJoinable< RES >::join(), Command::storeDef(), and SyncBarrier::sync().

Referenced by SessionCommandFunction_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ thread_has_ended

+ Inheritance diagram for SessionCommandFunction_test:
+ Collaboration diagram for SessionCommandFunction_test:

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