Skip to content

Commit f56a7d9

Browse files
committed
[test] slo/connect_time: fix publish_and_validate_stats with test runner-forced network
1 parent aafe4a2 commit f56a7d9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

user/tests/integration/slo/connect_time/connect_time.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,16 @@ DEFINE_WARM_BOOT_TEST(08)
368368

369369
test(publish_and_validate_stats) {
370370
#if Wiring_Cellular
371-
Cellular.on();
372-
assertTrue(waitFor(network().isOn, TEST_MAX_TIMEOUT));
373-
// Exclude 2G and non-production devices from the SLO validation
374-
CellularDevice devInfo = {};
375-
devInfo.size = sizeof(devInfo);
376-
assertEqual(cellular_device_info(&devInfo, nullptr), 0);
377-
if (devInfo.dev == DEV_SARA_G350 || devInfo.dev == DEV_QUECTEL_EG91_NA) {
378-
stats.excludeFromSloValidation = true;
371+
if (network() == Cellular) {
372+
Cellular.on();
373+
assertTrue(waitFor(network().isOn, TEST_MAX_TIMEOUT));
374+
// Exclude 2G and non-production devices from the SLO validation
375+
CellularDevice devInfo = {};
376+
devInfo.size = sizeof(devInfo);
377+
assertEqual(cellular_device_info(&devInfo, nullptr), 0);
378+
if (devInfo.dev == DEV_SARA_G350 || devInfo.dev == DEV_QUECTEL_EG91_NA) {
379+
stats.excludeFromSloValidation = true;
380+
}
379381
}
380382
#endif // Wiring_Cellular
381383
const size_t n = serializeStatsAsJson(nullptr /* buf */, 0 /* size */);

0 commit comments

Comments
 (0)