From ea5224111941a28f34af2bd958bac6f7900a55f8 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Sun, 17 Dec 2023 10:48:44 -0500 Subject: [PATCH] TC-IDM-1.2: Use random discriminator (#31046) --- src/python_testing/TC_IDM_1_2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/python_testing/TC_IDM_1_2.py b/src/python_testing/TC_IDM_1_2.py index 9715c7f0addafb..5f27dc1ec93e84 100644 --- a/src/python_testing/TC_IDM_1_2.py +++ b/src/python_testing/TC_IDM_1_2.py @@ -17,6 +17,7 @@ import inspect import logging +import random from dataclasses import dataclass import chip.clusters as Clusters @@ -184,7 +185,7 @@ async def test_TC_IDM_1_2(self): # The only way to have no accessing fabric is to have a PASE session and no added NOC # KeySetRead - fabric scoped command, should not be accessible over PASE # To get a PASE session, we need an open commissioning window - discriminator = self.matter_test_config.discriminators[0] + 1 + discriminator = random.randint(0, 4095) params = self.default_controller.OpenCommissioningWindow( nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=discriminator, option=1) @@ -260,7 +261,7 @@ async def test_TC_IDM_1_2(self): # Try with RevokeCommissioning # First open a commissioning window for us to revoke, so we know this command is able to succeed absent this error _ = self.default_controller.OpenCommissioningWindow( - nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=1234, option=1) + nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=discriminator, option=1) cmd = FakeRevokeCommissioning() try: await self.default_controller.TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(nodeid=self.dut_node_id, endpoint=0, payload=cmd)