tests: radius_acct_unreachable2 to detect retransmissions earlier
It looks like this test case can start showing failures with a change in the retransmission limit behavior for a server change. Check for retransmissions every second instead of only at the end of the four second wait to avoid this. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7bcb63913a
commit
54c154d2c9
1 changed files with 10 additions and 5 deletions
|
@ -114,11 +114,16 @@ def test_radius_acct_unreachable2(dev, apdev):
|
|||
subprocess.call(['ip', 'ro', 'del', '192.168.213.17', 'dev', 'lo'])
|
||||
connect(dev[0], "radius-acct")
|
||||
logger.info("Checking for RADIUS retries")
|
||||
time.sleep(4)
|
||||
mib = hapd.get_mib()
|
||||
if "radiusAccClientRetransmissions" not in mib:
|
||||
raise Exception("Missing MIB fields")
|
||||
if int(mib["radiusAccClientRetransmissions"]) < 1 and int(mib["radiusAccClientPendingRequests"]) < 1:
|
||||
found = False
|
||||
for i in range(4):
|
||||
time.sleep(1)
|
||||
mib = hapd.get_mib()
|
||||
if "radiusAccClientRetransmissions" not in mib:
|
||||
raise Exception("Missing MIB fields")
|
||||
if int(mib["radiusAccClientRetransmissions"]) > 0 or \
|
||||
int(mib["radiusAccClientPendingRequests"]) > 0:
|
||||
found = True
|
||||
if not found:
|
||||
raise Exception("Missing pending or retransmitted RADIUS Accounting requests")
|
||||
|
||||
def test_radius_acct_unreachable3(dev, apdev):
|
||||
|
|
Loading…
Reference in a new issue