DeviceClient_Test
class DeviceClient_Test : public CPPUNIT_NS::TestFixture
Functions
| Name | Description |
|---|---|
| testConcurrentInitTopology | Checks that concurrent calls to DeviceClient::initTopology() have the expected behavior - the broadcast of slotPing followed by a sleep of almost 2 seconds done from SignalSlotable::getAvailableInstances only happens once. The way to assert the expected behavior is by confirming that the calls take about the same time and obtain the same results. NOTE: This test uses the DeviceClient::getDevices() function to trigger the DeviceClient::initTopology() calls. |
Function Details
testConcurrentInitTopology
void testConcurrentInitTopology()
Checks that concurrent calls to DeviceClient::initTopology() have the expected behavior - the broadcast of slotPing followed by a sleep of almost 2 seconds done from SignalSlotable::getAvailableInstances only happens once. The way to assert the expected behavior is by confirming that the calls take about the same time and obtain the same results.
NOTE: This test uses the DeviceClient::getDevices() function to trigger the DeviceClient::initTopology() calls.