Skip to content

Commit

Permalink
Allow a little tolerance checking the duration returned in the event…
Browse files Browse the repository at this point in the history
… as CI tests can run slower
  • Loading branch information
PeterC1965 committed Aug 19, 2024
1 parent d96208c commit 2e1f99b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/python_testing/TC_DEM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,10 @@ async def test_TC_DEM_2_2(self):
self.step("18")
time.sleep(10)

# Allow a little tolerance checking the duration returned in the event as CI tests can run "slower"
event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustEnd)
asserts.assert_equal(event_data.duration, 10)
asserts.assert_greater_equal(event_data.duration, 10)
asserts.assert_less_equal(event_data.duration, 12)
asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kNormalCompletion)
asserts.assert_greater(event_data.energyUse, 0)

Expand Down

0 comments on commit 2e1f99b

Please sign in to comment.