diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 021f1372243b47..e901f496cfa830 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -1454,7 +1454,7 @@ async def TestSubscriptionResumptionCapacityStep1(self, nodeid: int, endpoint: i return True - def TestSubscriptionResumptionCapacityStep2(self, nodeid: int, endpoint: int, remote_ip: str, ssh_port: int, + async def TestSubscriptionResumptionCapacityStep2(self, nodeid: int, endpoint: int, remote_ip: str, ssh_port: int, remote_server_app: str, subscription_capacity: int): try: self.logger.info("Restart remote deivce") @@ -1469,8 +1469,9 @@ def TestSubscriptionResumptionCapacityStep2(self, nodeid: int, endpoint: int, re self.logger.info("Send a new subscription request from the second controller") # Close previous session so that the second controller will res-establish the session with the remote device self.devCtrl.CloseSession(nodeid) - self.devCtrl.ZCLSubscribeAttribute( - "BasicInformation", "NodeLabel", nodeid, endpoint, 1, 50, keepSubscriptions=True, autoResubscribe=False) + await self.devCtrl.ReadAttribute(nodeid, [(endpoint, Clusters.BasicInformation.Attributes.NodeLabel)], None, + False, reportInterval=(1, 50), + keepSubscriptions=True, autoResubscribe=False) if restartRemoteThread.is_alive(): # Thread join timed out diff --git a/src/controller/python/test/test_scripts/subscription_resumption_capacity_test_ctrl2.py b/src/controller/python/test/test_scripts/subscription_resumption_capacity_test_ctrl2.py index 2f3058afcd3bca..ac449a9f5478ac 100755 --- a/src/controller/python/test/test_scripts/subscription_resumption_capacity_test_ctrl2.py +++ b/src/controller/python/test/test_scripts/subscription_resumption_capacity_test_ctrl2.py @@ -19,6 +19,7 @@ # Commissioning test. +import asyncio import os import sys from optparse import OptionParser @@ -125,8 +126,9 @@ def main(): "Failed on on-network commissioing") FailIfNot( - test.TestSubscriptionResumptionCapacityStep2(options.nodeid, TEST_ENDPOINT_ID, options.deviceAddress, - TEST_SSH_PORT, options.remoteServerApp, options.subscriptionCapacity), + asyncio.run( + test.TestSubscriptionResumptionCapacityStep2(options.nodeid, TEST_ENDPOINT_ID, options.deviceAddress, + TEST_SSH_PORT, options.remoteServerApp, options.subscriptionCapacity)), "Failed on testing subscription resumption capacity") timeoutTicker.stop()