Skip to content

Commit

Permalink
Added 30 sec wait time after config push (#868)
Browse files Browse the repository at this point in the history
* Added 30 sec wait time after config push

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Modified logic for config push validation

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added json load for API response

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Changed auth-server ip

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Changed allow-dfs value to False

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added 56Kbps upload rate for download test cases

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added 56Kbps download rate for upload test cases

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added twog band config in sixg test cases

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* testbed name fix for OAP101 performance tests

Signed-off-by: anil-tegala <anil.tegala@candelatech.com>

---------

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
Co-authored-by: anil-tegala <anil.tegala@candelatech.com>
  • Loading branch information
jitendracandela and anil-tegala authored Jan 18, 2024
1 parent ce8f774 commit 8874417
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 71 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ jobs:
if: "!cancelled() && contains(fromJSON(needs.vars.outputs.marker_expressions), 'peak_throughput_tests')"
with:
namespace: ${{ steps.namespace.outputs.name }}-ssdbt
testbed: basic-1a
testbed: basic-2a
marker_expression: "performance and peak_throughput_tests"
configuration_file: "./lab_info.json"
testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }}
Expand All @@ -209,7 +209,7 @@ jobs:
if: "!cancelled() && contains(fromJSON(needs.vars.outputs.marker_expressions), 'client_scale_tests')"
with:
namespace: ${{ steps.namespace.outputs.name }}-wct
testbed: basic-1a
testbed: basic-2a
marker_expression: "performance and client_scale_tests"
configuration_file: "./lab_info.json"
testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }}
Expand All @@ -235,7 +235,7 @@ jobs:
if: "!cancelled() && contains(fromJSON(needs.vars.outputs.marker_expressions), 'dual_band_tests')"
with:
namespace: ${{ steps.namespace.outputs.name }}-wct
testbed: basic-1a
testbed: basic-2a
marker_expression: "performance and dual_band_tests"
configuration_file: "./lab_info.json"
testing_docker_image: tip-tip-wlan-cloud-docker-repo.jfrog.io/cloud-sdk-nightly:${{ github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion libs/tip_2x/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ def set_radio_config(self, radio_config={}, open_roaming=False):
base_radio_config_5g = {
"band": "5G",
"country": "US",
"allow-dfs": True,
"allow-dfs": False,
"channel-mode": "HE",
"channel": "auto"
}
Expand Down
135 changes: 86 additions & 49 deletions libs/tip_2x/tip_2x.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ def setup_basic_configuration(self, configuration=None,
idx=i)

# Check the latest uuid
r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=True, attach_allure=False)
uuid_before_apply = r_data["latest"]
# r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=True, attach_allure=False)
# uuid_before_apply = r_data["latest"]

# attaching ap logs before config push
ap_logs = self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=False)
Expand Down Expand Up @@ -346,60 +346,97 @@ def setup_basic_configuration(self, configuration=None,
allure.attach(body=ap_logs, name="AP logs during config fails: ")
logging.error("Failed to apply Config, Response code:" + str(resp.status_code))
pytest.fail("Failed to apply Config, Response code :" + str(resp.status_code))
# Find uuid from response
resp = json.loads(resp.text)
logging.info("resp: " + str(resp))
uuid = resp["details"]["uuid"]
logging.info("uuid from resp: " + str(uuid))
logging.info("Waiting for 30 sec after config push")
time.sleep(30)
r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=True, attach_allure=False)
uuid_after_apply = r_data["latest"]
x = 0
while uuid_before_apply == uuid_after_apply:
time.sleep(10)
x += 1
logging.info("uuid_before_apply: " + str(uuid_before_apply))
logging.info("uuid_after_apply: " + str(uuid_after_apply))
r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
uuid_after_apply = r_data["latest"]
if x == 5:
break
time.sleep(5)
r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
uuid_after_apply = r_data["latest"]
if uuid_after_apply == uuid_before_apply:
logging.error("Config is not received by AP")
logging.info("uuid_before_apply: " + str(uuid_before_apply))
logging.info("uuid_after_apply: " + str(uuid_after_apply))
self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True)
pytest.fail("Config sent from Gateway is not received by AP")
self.dut_library_object.get_latest_config_recieved(idx=i, print_log=True, attach_allure=False)

r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
latest_uuid = r_data["latest"]

r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
active_uuid = r_data["active"]

x = 0
while latest_uuid == active_uuid:
time.sleep(10)
x += 1
logging.info("active_uuid: " + str(active_uuid))
logging.info("latest_uuid: " + str(latest_uuid))
r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
active_uuid = r_data["active"]
latest_uuid = r_data["latest"]
if x == 5:
break
if latest_uuid != active_uuid:
logging.error("Config is not received by AP")
logging.info("uuid_before_apply: " + str(uuid_before_apply))
logging.info("uuid_after_apply: " + str(uuid_after_apply))
self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True)
pytest.fail("Config sent from Gateway is Received by AP, But not Applied by AP")
self.dut_library_object.get_active_config(idx=i, print_log=True, attach_allure=False)
latest_uuid_after_apply = r_data["latest"]
active_uuid_after_apply = r_data["active"]
logging.info("latest_uuid_after_apply: " + str(latest_uuid_after_apply))
logging.info("active_uuid_after_apply: " + str(active_uuid_after_apply))
print(type(uuid), type(latest_uuid_after_apply), type(active_uuid_after_apply))
if uuid == latest_uuid_after_apply == active_uuid_after_apply:
logging.info("Config is Properly Applied on AP")
logging.info("latest_uuid_after_apply: " + str(latest_uuid_after_apply))
logging.info("active_uuid_after_apply: " + str(active_uuid_after_apply))
else:
all_three_uuid_same = False
for k in range(5):
time.sleep(10)
r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False,
attach_allure=False)
latest_uuid_after_apply = r_data["latest"]
active_uuid_after_apply = r_data["active"]
logging.info("latest_uuid_after_apply: " + str(latest_uuid_after_apply))
logging.info("active_uuid_after_apply: " + str(active_uuid_after_apply))
if uuid == latest_uuid_after_apply == active_uuid_after_apply:
all_three_uuid_same = True
break
if not all_three_uuid_same:
logging.info("latest_uuid_after_apply: " + str(latest_uuid_after_apply))
logging.info("active_uuid_after_apply: " + str(active_uuid_after_apply))
self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True)
pytest.fail("Config is not Properly Applied on AP")

logging.info("Config is Properly Applied on AP, Waiting for 30 Seconds for All interfaces to come up")
self.dut_library_object.get_active_config(idx=i, print_log=True, attach_allure=False)
logging.info("Waiting for 30 Seconds for All interfaces to come up")
# wait time interfaces to come up
time.sleep(30)

# x = 0
# while uuid_before_apply == uuid_after_apply:
# time.sleep(10)
# x += 1
# logging.info("uuid_before_apply: " + str(uuid_before_apply))
# logging.info("uuid_after_apply: " + str(uuid_after_apply))
# r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
# uuid_after_apply = r_data["latest"]
# if x == 5:
# break
# time.sleep(5)
# r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
# uuid_after_apply = r_data["latest"]
# if uuid_after_apply == uuid_before_apply:
# logging.error("Config is not received by AP")
# logging.info("uuid_before_apply: " + str(uuid_before_apply))
# logging.info("uuid_after_apply: " + str(uuid_after_apply))
# self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True)
# pytest.fail("Config sent from Gateway is not received by AP")
# self.dut_library_object.get_latest_config_recieved(idx=i, print_log=True, attach_allure=False)
#
# r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
# latest_uuid = r_data["latest"]
#
# r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
# active_uuid = r_data["active"]
#
# x = 0
# while latest_uuid == active_uuid:
# time.sleep(10)
# x += 1
# logging.info("active_uuid: " + str(active_uuid))
# logging.info("latest_uuid: " + str(latest_uuid))
# r_data = self.dut_library_object.ubus_call_ucentral_status(idx=i, print_log=False, attach_allure=False)
# active_uuid = r_data["active"]
# latest_uuid = r_data["latest"]
# if x == 5:
# break
# if latest_uuid != active_uuid:
# logging.error("Config is not received by AP")
# logging.info("uuid_before_apply: " + str(uuid_before_apply))
# logging.info("uuid_after_apply: " + str(uuid_after_apply))
# self.dut_library_object.get_dut_logs(idx=i, print_log=False, attach_allure=True)
# pytest.fail("Config sent from Gateway is Received by AP, But not Applied by AP")
# self.dut_library_object.get_active_config(idx=i, print_log=True, attach_allure=False)
#
# logging.info("Config is Properly Applied on AP, Waiting for 30 Seconds for All interfaces to come up")
# # wait time interfaces to come up
# time.sleep(30)

self.post_apply_check(idx=i) # Do check AP after pushing the configuration

for i in range(len(self.device_under_tests_info)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{"ssid_name": "ssid_captive_portal_wpa2_2g_br", "appliedRadios": ["2G"], "security_key": "something",
"captive": {
"auth-mode": "radius",
"auth-server": "10.28.3.43",
"auth-server": "10.28.3.21",
"auth-port": 1812,
"auth-secret": "testing123",
"walled-garden-fqdn": [
Expand Down Expand Up @@ -68,7 +68,7 @@ def test_bridge_wpa2_2g_radius_user_and_pass(self, get_test_library, get_dut_log
"security_key": "something",
"captive": {
"auth-mode": "radius",
"auth-server": "10.28.3.43",
"auth-server": "10.28.3.21",
"auth-port": 1812,
"auth-secret": "testing123",
"walled-garden-fqdn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_client_wpa2_NAT_tcp_dl(self, get_test_library, get_dut_logs_per_test_ca
mode = "NAT-WAN"
get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode,
download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256",
upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000",
upload_rate="56Kbps", protocol="TCP-IPv4", duration="60000",
move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name,
num_stations={"2G": max_stations})
assert True
Expand Down Expand Up @@ -206,7 +206,7 @@ def test_client_wpa2_NAT_tcp_dl(self, get_test_library, get_dut_logs_per_test_ca
mode = "NAT-WAN"
get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode,
download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256",
upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000",
upload_rate="56Kbps", protocol="TCP-IPv4", duration="60000",
move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name,
num_stations={"5G": max_stations})

Expand Down Expand Up @@ -358,7 +358,7 @@ def test_client_wpa2_NAT_tcp_dl(self, get_test_library, get_dut_logs_per_test_ca
mode = "NAT-WAN"
get_test_library.wifi_capacity(instance_name="test_client_wpa2_NAT_tcp_dl", mode=mode,
download_rate="1Gbps", batch_size="1,5,10,20,40,64,128,256",
upload_rate="0Gbps", protocol="TCP-IPv4", duration="60000",
upload_rate="56Kbps", protocol="TCP-IPv4", duration="60000",
move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name,
num_stations={"2G": max_stations, "5G": max_stations})
assert True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test
"mode": "BRIDGE",
"ssid_modes": {
"wpa3_personal": [
{"ssid_name": "ssid_wpa3_2g", "appliedRadios": ["2G"], "security_key": "something"},
{"ssid_name": "ssid_wpa3_6g", "appliedRadios": ["6G"], "security_key": "something"}
]
},
Expand All @@ -326,8 +327,7 @@ def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test
)
@pytest.mark.usefixtures("setup_configuration")
@pytest.mark.wpa3_personal
@pytest.mark.sixg
@pytest.mark.sixg_band
@pytest.mark.twog
@pytest.mark.performance
class TestWifiCapacityBRIDGEMode6G(object):
""" Client Scale Test BRIDGE mode
Expand All @@ -336,6 +336,7 @@ class TestWifiCapacityBRIDGEMode6G(object):

@pytest.mark.wpa3_personal
@pytest.mark.tcp_download
@pytest.mark.sixg
@allure.title("Test for TCP Download 6 GHz")
def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case,
get_test_device_logs, num_stations, setup_configuration, max_stations):
Expand All @@ -355,6 +356,7 @@ def test_client_wpa3_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test
# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3659", name="WIFI-3659")
@pytest.mark.wpa3_personal
@pytest.mark.udp_download
@pytest.mark.sixg
@allure.title("Test for UDP Download 6 GHz")
def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test_case,
get_test_device_logs, num_stations, setup_configuration, max_stations):
Expand All @@ -374,6 +376,7 @@ def test_client_wpa3_bridge_udp_dl(self, get_test_library, get_dut_logs_per_test
# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3669", name="WIFI-3669")
@pytest.mark.wpa3_personal
@pytest.mark.tcp_bidirectional
@pytest.mark.sixg
@allure.title("Test for TCP Bidirectional 6 GHz")
def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_logs_per_test_case,
get_test_device_logs, num_stations, setup_configuration,
Expand All @@ -394,6 +397,7 @@ def test_client_wpa3_bridge_tcp_bidirectional(self, get_test_library, get_dut_lo
# @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3663", name="WIFI-3663")
@pytest.mark.wpa3_personal
@pytest.mark.udp_bidirectional
@pytest.mark.sixg
@allure.title("Test for UDP Bidirectional 6 GHz")
def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_logs_per_test_case,
get_test_device_logs, num_stations, setup_configuration,
Expand All @@ -413,6 +417,7 @@ def test_client_wpa3_bridge_udp_bidirectional(self, get_test_library, get_dut_lo

@pytest.mark.wpa3_personal
@pytest.mark.tcp_upload
@pytest.mark.sixg
@allure.title("Test for TCP Upload 6 GHz")
def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test_case,
get_test_device_logs, num_stations, setup_configuration, max_stations):
Expand All @@ -431,6 +436,7 @@ def test_client_wpa3_bridge_tcp_ul(self, get_test_library, get_dut_logs_per_test

@pytest.mark.wpa3_personal
@pytest.mark.udp_upload
@pytest.mark.sixg
@allure.title("Test for UDP Upload 6 GHz")
def test_client_wpa3_bridge_udp_ul(self, get_test_library, get_dut_logs_per_test_case,
get_test_device_logs, num_stations, setup_configuration, max_stations):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def test_tcp_udp_wpa3_personal_bridge_5g_band(self, get_test_library, get_dut_lo
)

@pytest.mark.wpa3_personal
@pytest.mark.twog
@pytest.mark.sixg
@pytest.mark.performance
@allure.title("Test for TCP UDP Download 6 GHz")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def test_tcp_udp_wpa3_personal_nat_5g_band(self, get_test_library, get_dut_logs_
)

@pytest.mark.wpa3_personal
@pytest.mark.twog
@pytest.mark.sixg
@pytest.mark.performance
@allure.title("Test for TCP UDP Download 6 GHz")
Expand Down
Loading

0 comments on commit 8874417

Please sign in to comment.