increased test timeout and also comparing number of received notifications vs sent notifications
This commit is contained in:
parent
97f76126e6
commit
663a0b2c9b
|
@ -1,4 +1,4 @@
|
||||||
TIMEOUT(120000);
|
TIMEOUT(240000);
|
||||||
|
|
||||||
nr_recv = 0;
|
nr_recv = 0;
|
||||||
nr_timedout = 0;
|
nr_timedout = 0;
|
||||||
|
@ -9,38 +9,43 @@ while (nr_sent < 10) {
|
||||||
/* Count received packets */
|
/* Count received packets */
|
||||||
if (msg.contains('received')) {
|
if (msg.contains('received')) {
|
||||||
nr_recv++;
|
nr_recv++;
|
||||||
log.log("Received packets count now: " + nr_recv + "\n");
|
log.log("RECV=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Count timed out packets */
|
/* Count timed out packets */
|
||||||
else if (msg.contains('timed out')) {
|
else if (msg.contains('timed out')) {
|
||||||
nr_timedout++;
|
nr_timedout++;
|
||||||
log.log("Timed out packets count now: " + nr_timedout + "\n");
|
log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", TIMEDOUT=" + nr_timedout + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Count sent packets */
|
/* Count sent packets */
|
||||||
else if (msg.contains('sent to')) {
|
else if (msg.contains('sent to')) {
|
||||||
nr_sent++;
|
nr_sent++;
|
||||||
log.log("Sent packets count now: " + nr_sent + "\n");
|
log.log("recv=" + nr_recv + ", SENT=" + nr_sent + ", timedout=" + nr_timedout + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
YIELD();
|
YIELD();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure received counter matches sent counter */
|
/* Make sure received counter matches sent counter */
|
||||||
if (nr_recv < nr_sent) {
|
if (nr_recv < nr_sent-3) {
|
||||||
log.log("Received < Sent: " + nr_recv + " < " + nr_sent + "\n");
|
log.log("Error: Received << Sent!\n");
|
||||||
log.log("Received packets less than acked sent packets!\n");
|
log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n");
|
||||||
|
log.testFailed();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nr_recv > nr_sent+3) {
|
||||||
|
log.log("Error: Received >> Sent!\n");
|
||||||
|
log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n");
|
||||||
log.testFailed();
|
log.testFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure some packets timed out (all from node 4) */
|
/* Make sure some packets timed out (all from node 4) */
|
||||||
if (nr_timedout < 2) {
|
if (nr_timedout < 2) {
|
||||||
log.log("Timed out: " + nr_timedout + "\n");
|
log.log("Error: Too few packets timed out!\n");
|
||||||
log.log("Too few packets timed out!\n");
|
log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n");
|
||||||
log.testFailed();
|
log.testFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
log.log("Received / Sent: " + nr_recv + " / " + nr_sent + "\n");
|
log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n");
|
||||||
log.log("Timed out: " + nr_timedout + "\n");
|
|
||||||
log.testOK();
|
log.testOK();
|
||||||
|
|
Loading…
Reference in a new issue