HLCC Documentation 2.2.0
Loading...
Searching...
No Matches
Classes | Functions
hlcc::oldbmux::test Namespace Reference

Classes

class  CiiOldbDataPointAsyncTest
 
class  CircularBufferConcurrentTest
 

Functions

 TEST_F (CiiOldbDataPointAsyncTest, testReadValue)
 
 TEST_F (CiiOldbDataPointAsyncTest, testWriteValueSimple)
 
 TEST_F (CiiOldbDataPointAsyncTest, testTransferValueWhenDiscarding)
 
 TEST_F (CircularBufferConcurrentTest, testObjectSize)
 
 TEST_F (CircularBufferConcurrentTest, testInitialValues)
 
 TEST_F (CircularBufferConcurrentTest, testClear)
 
 TEST_F (CircularBufferConcurrentTest, testPushOverwrite)
 
 TEST_F (CircularBufferConcurrentTest, testNonWaitingPoll)
 
 TEST_F (CircularBufferConcurrentTest, testBufferLockExternal)
 
 TEST_F (CircularBufferConcurrentTest, testMultipleThreads)
 
 TEST_F (CircularBufferConcurrentTest, testDiscardListener)
 
 TEST_F (CircularBufferConcurrentTest, testNonCopyableData)
 

Function Documentation

◆ TEST_F() [1/12]

hlcc::oldbmux::test::TEST_F ( CiiOldbDataPointAsyncTest ,
testReadValue  )

Read the DP's value. This is a simple synchronous call, delegated to the CII DP class. It mostly verifies that connection to the OLDB / DP is working.

◆ TEST_F() [2/12]

hlcc::oldbmux::test::TEST_F ( CiiOldbDataPointAsyncTest ,
testTransferValueWhenDiscarding  )

Tests the transfering of an OLDB value when a record is discarded by another record that only contains quality but no value.

Note that when porting to OLDB simulator, ETCS-1776, we probably will have to introduce an artifical delay in the writing if the simulator does not already do that.

◆ TEST_F() [3/12]

hlcc::oldbmux::test::TEST_F ( CiiOldbDataPointAsyncTest ,
testWriteValueSimple  )

Write the DP's value twice.

◆ TEST_F() [4/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testBufferLockExternal  )

◆ TEST_F() [5/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testClear  )

◆ TEST_F() [6/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testDiscardListener  )

Similar to "testPushOverwrite", but with a discard listener that allows validating that the first element gets discarded and the listener is notified.

◆ TEST_F() [7/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testInitialValues  )

◆ TEST_F() [8/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testMultipleThreads  )

Concurrent use with 2 pushing threads and 2 polling threads (1 blocking, 1 not blocking).

Note that pushing is potentially lossy because of the nature of the circular buffer. We continue pushing values into the buffer until a specified number of values has been read from the buffer.

This test is not asserting anything about lock fairness (anyway not guaranteed by the standard). It also does not test performance. We notice though that there are many more push operations than poll. Not clear if this has to do with the mutex/lock/condition, or with the underlying boost circularBuffer.

◆ TEST_F() [9/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testNonCopyableData  )

We need to use the circular buffer with non-copyable data (that contains a boost::future).

◆ TEST_F() [10/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testNonWaitingPoll  )

◆ TEST_F() [11/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testObjectSize  )

◆ TEST_F() [12/12]

hlcc::oldbmux::test::TEST_F ( CircularBufferConcurrentTest ,
testPushOverwrite  )