Wifi_provisioning_mgr_test: Allow three attempts to connect to AP before concluding provisioning failure
This commit is contained in:
parent
8419aa85a9
commit
415ccf8518
1 changed files with 5 additions and 0 deletions
|
@ -91,6 +91,7 @@ def test_examples_wifi_prov_mgr(env, extra_data):
|
|||
raise RuntimeError("Failed to send apply config")
|
||||
|
||||
success = False
|
||||
retry = 0
|
||||
while True:
|
||||
time.sleep(5)
|
||||
print("Wi-Fi connection state")
|
||||
|
@ -100,6 +101,10 @@ def test_examples_wifi_prov_mgr(env, extra_data):
|
|||
elif (ret == 0):
|
||||
print("Provisioning was successful")
|
||||
success = True
|
||||
elif (ret == 3 and retry < 3):
|
||||
retry = retry + 1
|
||||
print("Connection failed.. retry again...: ", ret)
|
||||
continue
|
||||
break
|
||||
|
||||
if not success:
|
||||
|
|
Loading…
Reference in a new issue