diff --git a/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc b/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc index 297ef0646..6884c9fc5 100644 --- a/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc +++ b/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc @@ -287,9 +287,14 @@ GENERATE_MSG(2000000, "add-sink"); lostMsgs = 0; -TIMEOUT(2000000, if(lostMsgs == 0) { log.testOK(); } ); +// we check that we got up to at least message 62 and +// (the simulation is 4000000ms = 66 minutes long) +// that we did not lose anything since 34 +// (the sink is back at 2000000ms = 33 minutes) +TIMEOUT(4000000, if(lastMsg >= 62 && lastMissed <= 34) { log.testOK(); } ); lastMsg = -1; +lastMissed = -1; packets = "_________"; hops = 0; @@ -321,6 +326,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { + lastMissed = num; numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n");