mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Wifi_provisioning_mgr_test: Allow three attempts to connect to AP before concluding provisioning failure (v4.0)
This commit is contained in:
parent
1e2ca78aac
commit
dfd197b4c5
@ -87,6 +87,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")
|
||||
@ -96,6 +97,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…
x
Reference in New Issue
Block a user