Skip to content

Commit

Permalink
AutoRelockTime wait will happen when Pics is enabled (project-chip#35891
Browse files Browse the repository at this point in the history
)

Co-authored-by: cjandhyala <68604034+cjandhyala@users.noreply.github.com>
  • Loading branch information
Harshith-GRL and cjandhyala authored Oct 4, 2024
1 parent 27b5f3a commit 22c488b
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/python_testing/drlk_2_x_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,21 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo
autoRelockTime_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.AutoRelockTime)
logging.info("AutoRelockTime value is %s" % (autoRelockTime_dut))

if self.check_pics(lockUnlockCmdRspPICS):
self.print_step("17", "Send %s with valid Pincode and verify success" % lockUnlockText)
command = lockUnlockCommand(PINCode=pin_code)
await self.send_drlk_cmd_expect_success(command=command)
# Add additional wait time buffer for motor movement, etc.
time.sleep(autoRelockTime_dut + 5)

if self.check_pics("DRLK.S.A0000"):
self.print_step("18", "TH reads LockState attribute after AutoRelockTime Expires")
lockstate_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.LockState)
logging.info("Current LockState is %s" % (lockstate_dut))
asserts.assert_equal(lockstate_dut, Clusters.DoorLock.Enums.DlLockState.kLocked,
"LockState expected to be value==Locked")
if self.check_pics(lockUnlockCmdRspPICS):
self.print_step("17", "Send %s with valid Pincode and verify success" % lockUnlockText)
command = lockUnlockCommand(PINCode=pin_code)
await self.send_drlk_cmd_expect_success(command=command)

if self.check_pics("DRLK.S.A0000"):
self.print_step("18", "TH reads LockState attribute after AutoRelockTime Expires")
# Add additional wait time buffer for motor movement, etc.
time.sleep(autoRelockTime_dut + 5)
lockstate_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.LockState)
logging.info("Current LockState is %s" % (lockstate_dut))
asserts.assert_equal(lockstate_dut, Clusters.DoorLock.Enums.DlLockState.kLocked,
"LockState expected to be value==Locked")
else:
logging.info("Steps 15 to 18 are Skipped as the PICs DRLK.S.A0023 not enabled")
await self.cleanup_users_and_credentials(user_clear_step="20", clear_credential_step="19",
credentials=credential, userIndex=1)

Expand Down

0 comments on commit 22c488b

Please sign in to comment.