aboutsummaryrefslogtreecommitdiff
path: root/unittest/test_multiple_devices.cc
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/test_multiple_devices.cc')
-rw-r--r--unittest/test_multiple_devices.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/unittest/test_multiple_devices.cc b/unittest/test_multiple_devices.cc
index 65ae9ab..f497908 100644
--- a/unittest/test_multiple_devices.cc
+++ b/unittest/test_multiple_devices.cc
@@ -99,6 +99,12 @@ TEST_CASE("Use API ID", "[BASIC]") {
REQUIRE(v.size() > 0);
//no refresh - should not reconnect to new devices
+ // Scenario:
+ // 1. Run test
+ // 2. Remove one of the devices and reinsert it after a while
+ // 3. Device should not be reconnected and test should not crash
+ // 4. Remove all devices - test should continue
+
for (int j = 0; j < 100; j++) {
for (auto i : v) {
if (!nm->connect_with_ID(i)) continue;
@@ -121,6 +127,11 @@ TEST_CASE("Use API ID refresh", "[BASIC]") {
nm->set_loglevel(2);
//refresh in each iteration - should reconnect to new devices
+ // Scenario:
+ // 1. Run test
+ // 2. Remove one of the devices and reinsert it after a while
+ // 3. Device should be reconnected
+
for(int j=0; j<100; j++) {
auto v = nm->list_devices_by_cpuID();
REQUIRE(v.size() > 0);