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

Description

Test:
stress test for the Advice system: Concurrently add a multitude of advice provisions and check correct matching and dispatch of all advice.
Todo:
advanced topic, deferred for now (4/10) ////////////////////TICKET #610
See also
advice.hpp
AdviceBasics_test

Definition at line 75 of file advice-multiplicity-test.cpp.

Private Member Functions

void check_highLoadSimpleMatch ()
 
void check_multipleMatch ()
 
void check_unlockedDispatch ()
 
virtual void run (Arg)
 

Member Function Documentation

◆ check_highLoadSimpleMatch()

void check_highLoadSimpleMatch ( )
inlineprivate
Test:
run simple pairs of collaborators in multiple threads.

Intentionally, there should be just a single match per pair, but the timings of provision and pickup are chosen randomly

Definition at line 92 of file advice-multiplicity-test.cpp.

◆ check_multipleMatch()

void check_multipleMatch ( )
inlineprivate
Test:
here, one advice might reach multiple advised entities and one entity may receive multiple pieces of advice, overwriting previous advice provisions.

The receiving clients (advised entities) are polling irregularly, but finally should each pick up the correct value. To check this, advice values are generated with a specific pattern, which can be check summed

Definition at line 106 of file advice-multiplicity-test.cpp.

◆ check_unlockedDispatch()

void check_unlockedDispatch ( )
inlineprivate
Test:
when dispatching Advice, some of the locking can be left out.

Obviously this means we can't be sure anymore the client will see the newly dispatched piece of advice. But the main focus of this test is to ensure the advice system itself is working properly even without complete locking. To verify the results, each thread performs a kind of "flush" (actually creates a memory barrier) before picking up the final value

Definition at line 122 of file advice-multiplicity-test.cpp.

+ Inheritance diagram for AdviceMultiplicity_test:
+ Collaboration diagram for AdviceMultiplicity_test:

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