@@ -94,9 +94,7 @@ def start(self):
94
94
super ().start (expected_output = "Successfully opened pairing window on the device" )
95
95
96
96
def commission_on_network (self , node_id : int , setup_pin_code : int , filter_type = None , filter = None ):
97
- self .send (
98
- f"pairing onnetwork { node_id } { setup_pin_code } " ,
99
- expected_output = f"Commissioning complete for node ID { node_id :#018x} : success" )
97
+ self .send (f"pairing onnetwork { node_id } { setup_pin_code } " )
100
98
101
99
102
100
class TC_MCORE_FS_1_4 (MatterBaseTest ):
@@ -266,16 +264,19 @@ async def test_TC_MCORE_FS_1_4(self):
266
264
filter = discriminator ,
267
265
)
268
266
269
- # Wait some time, so the dynamic endpoint will appear on the TH_FSA_BRIDGE.
270
- await asyncio .sleep (5 )
271
-
272
- # Get the list of endpoints on the TH_FSA_BRIDGE after adding the TH_SERVER_NO_UID.
273
- th_fsa_bridge_endpoints_new = set (await self .read_single_attribute_check_success (
274
- cluster = Clusters .Descriptor ,
275
- attribute = Clusters .Descriptor .Attributes .PartsList ,
276
- node_id = th_fsa_bridge_th_node_id ,
277
- endpoint = 0 ,
278
- ))
267
+ get_dynamic_endpoint_retries = 60
268
+ th_fsa_bridge_endpoints_new = set (th_fsa_bridge_endpoints )
269
+ # Try to get the dynamic endpoint number for the TH_SERVER_NO_UID on the TH_FSA_BRIDGE.
270
+ while th_fsa_bridge_endpoints_new == th_fsa_bridge_endpoints and get_dynamic_endpoint_retries > 0 :
271
+ await asyncio .sleep (0.5 )
272
+ get_dynamic_endpoint_retries -= 1
273
+ # Get the list of endpoints on the TH_FSA_BRIDGE.
274
+ th_fsa_bridge_endpoints_new .update (await self .read_single_attribute_check_success (
275
+ cluster = Clusters .Descriptor ,
276
+ attribute = Clusters .Descriptor .Attributes .PartsList ,
277
+ node_id = th_fsa_bridge_th_node_id ,
278
+ endpoint = 0 ,
279
+ ))
279
280
280
281
# Get the endpoint number for just added TH_SERVER_NO_UID.
281
282
logging .info ("Endpoints on TH_FSA_BRIDGE: old=%s, new=%s" , th_fsa_bridge_endpoints , th_fsa_bridge_endpoints_new )
0 commit comments