Lumiera  0.pre.03
»edit your freedom«
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 Member Functions

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

Public Attributes

bool thread_has_ended {false}
 

Member Function Documentation

◆ 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.

◆ 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 SteamDispatcher::instance.

◆ perform_simpleInvocation()

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

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

◆ 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.

◆ 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.

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

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