Skip to content

Commit 5749641

Browse files
authored
Merge branch 'master' into add-water-heater-management-test-scripts
2 parents 421f3f3 + 44c725d commit 5749641

File tree

9 files changed

+21
-15
lines changed

9 files changed

+21
-15
lines changed

examples/energy-management-app/energy-management-common/src/FakeReadings.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ void FakeReadings::StartFakeReadings(EndpointId aEndpointId, int64_t aPower_mW,
9393

9494
if (bReset)
9595
{
96+
// Use a fixed random seed to try to avoid random CI test failures
97+
// which are caused when the test is checking for 2 different numbers.
98+
// This is statistically more likely when the test runs for a long time
99+
// or if the seed is not set
100+
srand(1);
101+
96102
mTotalEnergyImported = 0;
97103
mTotalEnergyExported = 0;
98104
}

scripts/setup/zap.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"mac-amd64",
99
"windows-amd64"
1010
],
11-
"tags": ["version:2@v2024.07.10-nightly.1"]
11+
"tags": ["version:2@v2024.07.26-nightly.1"]
1212
},
1313
{
1414
"_comment": "Always get the amd64 version on mac until usable arm64 zap build is available",
1515
"path": "fuchsia/third_party/zap/mac-amd64",
1616
"platforms": ["mac-arm64"],
17-
"tags": ["version:2@v2024.07.10-nightly.1"]
17+
"tags": ["version:2@v2024.07.26-nightly.1"]
1818
}
1919
]
2020
}

scripts/setup/zap.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2024.07.10-nightly
1+
v2024.07.26-nightly

scripts/tools/zap/zap_execution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Use scripts/tools/zap/version_update.py to manage ZAP versioning as many
2424
# files may need updating for versions
2525
#
26-
MIN_ZAP_VERSION = '2024.7.10'
26+
MIN_ZAP_VERSION = '2024.7.26'
2727

2828

2929
class ZapTool:

src/python_testing/TC_EEM_2_2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def steps_TC_EEM_2_2(self) -> list[TestStep]:
5353
TestStep("4", "Wait 3 seconds"),
5454
TestStep("4a", "TH reads from the DUT the CumulativeEnergyImported attribute",
5555
"Verify the read is successful and note the value read."),
56-
TestStep("5", "Wait 5 seconds"),
56+
TestStep("5", "Wait 3 seconds"),
5757
TestStep("5a", "TH reads from the DUT the CumulativeEnergyImported attribute",
5858
"Verify the read is successful and that the value is greater than the value measured in step 4a."),
5959
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
@@ -80,7 +80,7 @@ async def test_TC_EEM_2_2(self):
8080
cumulative_energy_imported = await self.read_eem_attribute_expect_success("CumulativeEnergyImported")
8181

8282
self.step("5")
83-
time.sleep(5)
83+
time.sleep(3)
8484

8585
self.step("5a")
8686
cumulative_energy_imported_2 = await self.read_eem_attribute_expect_success("CumulativeEnergyImported")

src/python_testing/TC_EEM_2_3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def steps_TC_EEM_2_3(self) -> list[TestStep]:
5353
TestStep("4", "Wait 6 seconds"),
5454
TestStep("4a", "TH reads from the DUT the CumulativeEnergyExported attribute",
5555
"Verify the read is successful and note the value read."),
56-
TestStep("5", "Wait 11 seconds"),
56+
TestStep("5", "Wait 6 seconds"),
5757
TestStep("5a", "TH reads from the DUT the CumulativeEnergyExported attribute",
5858
"Verify the read is successful and that the value is greater than the value measured in step 4a."),
5959
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
@@ -80,7 +80,7 @@ async def test_TC_EEM_2_3(self):
8080
cumulative_energy_exported = await self.read_eem_attribute_expect_success("CumulativeEnergyExported")
8181

8282
self.step("5")
83-
time.sleep(11)
83+
time.sleep(6)
8484

8585
self.step("5a")
8686
cumulative_energy_exported_2 = await self.read_eem_attribute_expect_success("CumulativeEnergyExported")

src/python_testing/TC_EEM_2_4.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def steps_TC_EEM_2_4(self) -> list[TestStep]:
5353
TestStep("4", "Wait 3 seconds"),
5454
TestStep("4a", "TH reads from the DUT the PeriodicEnergyImported attribute",
5555
"Verify the read is successful and note the value read."),
56-
TestStep("5", "Wait 5 seconds"),
56+
TestStep("5", "Wait 3 seconds"),
5757
TestStep("5a", "TH reads from the DUT the PeriodicEnergyImported attribute",
5858
"Verify the read is successful and that the value read has to be different from value measure in step 4a."),
5959
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
@@ -80,7 +80,7 @@ async def test_TC_EEM_2_4(self):
8080
periodic_energy_imported = await self.read_eem_attribute_expect_success("PeriodicEnergyImported")
8181

8282
self.step("5")
83-
time.sleep(5)
83+
time.sleep(3)
8484

8585
self.step("5a")
8686
periodic_energy_imported_2 = await self.read_eem_attribute_expect_success("PeriodicEnergyImported")

src/python_testing/TC_EEM_2_5.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def steps_TC_EEM_2_5(self) -> list[TestStep]:
5353
TestStep("4", "Wait 6 seconds"),
5454
TestStep("4a", "TH reads from the DUT the PeriodicEnergyExported attribute",
5555
"Verify the read is successful and note the value read."),
56-
TestStep("5", "Wait 11 seconds"),
56+
TestStep("5", "Wait 6 seconds"),
5757
TestStep("5a", "TH reads from the DUT the PeriodicEnergyExported attribute",
5858
"Verify the read is successful and that the value read has to be different from value measure in step 4a."),
5959
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
@@ -80,7 +80,7 @@ async def test_TC_EEM_2_5(self):
8080
periodic_energy_exported = await self.read_eem_attribute_expect_success("PeriodicEnergyExported")
8181

8282
self.step("5")
83-
time.sleep(11)
83+
time.sleep(6)
8484

8585
self.step("5a")
8686
periodic_energy_exported_2 = await self.read_eem_attribute_expect_success("PeriodicEnergyExported")

src/python_testing/TC_EPM_2_2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def steps_TC_EPM_2_2(self) -> list[TestStep]:
6161
"Verify the read is successful and that the value is between 3'848 and 4'848 mA. Note the value read."),
6262
TestStep("4c", "TH reads from the DUT the Voltage attribute",
6363
"Verify the read is successful and that the value is between 229'000 and 231'000 mV. Note the value read."),
64-
TestStep("5", "Wait 5 seconds"),
64+
TestStep("5", "Wait 3 seconds"),
6565
TestStep("5a", "TH reads from the DUT the ActivePower attribute",
6666
"Verify the read is successful, that the value is between '980'000 and 1'020'000 mW, and the value is different from the value read in step 4a."),
6767
TestStep("5b", "TH reads from the DUT the ActiveCurrent attribute",
@@ -105,8 +105,8 @@ async def test_TC_EPM_2_2(self):
105105
voltage = await self.check_epm_attribute_in_range("Voltage", 229000, 231000)
106106

107107
self.step("5")
108-
# After 5 seconds...
109-
time.sleep(5)
108+
# After 3 seconds...
109+
time.sleep(3)
110110

111111
self.step("5a")
112112
# Active power is Mandatory

0 commit comments

Comments
 (0)