61@@ -62,8 +62,11 @@ def _test_getnettotals(self):
62 # the bytes sent/received should change
63 # note ping and pong are 32 bytes each
64 self.nodes[0].ping()
65- wait_until(lambda: (self.nodes[0].getnettotals()['totalbytessent'] >= net_totals_after['totalbytessent'] + 32 * 2), timeout=1)
66- wait_until(lambda: (self.nodes[0].getnettotals()['totalbytesrecv'] >= net_totals_after['totalbytesrecv'] + 32 * 2), timeout=1)
67+ wait_until(lambda: (
68+ self.nodes[0].getnettotals()['totalbytessent'] >= net_totals_after['totalbytessent'] + 32 * 2
69+ and self.nodes[0].getnettotals()['totalbytesrecv'] >= net_totals_after['totalbytesrecv'] + 32 * 2
70+ and ('pong' in self.nodes[0].getpeerinfo()[0]['bytesrecv_per_msg'])
Instead of and
, could split them into separate lines with separate wait_until
s to see what condition actually fails (if one does)?
Ah, right, didn’t consider that. Fixed.