From 6c1efdffe0cae0878724463ba46a5658da10a920 Mon Sep 17 00:00:00 2001 From: Noureddine Date: Tue, 27 Jun 2023 16:59:49 +0100 Subject: [PATCH] Promote pointset_sample_rate, pointset_publish_interval, device_config_acked to BETA (#673) --- .github/workflows/testing.yml | 2 +- docs/specs/sequences/generated.md | 35 +++++++++++++++++++ etc/sequencer.out | 6 ++-- etc/test_itemized.out | 2 +- .../java/daq/pubber/SupportedFeatures.java | 4 +++ .../sequencer/sequences/ConfigSequences.java | 2 +- .../sequences/PointsetSequences.java | 6 ++-- .../mqtt/sequencer/SequenceRunnerTest.java | 2 +- 8 files changed, 49 insertions(+), 10 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0c2c872942..b825b5e8cc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -185,7 +185,7 @@ jobs: sequencer_dep: name: Sequencer Suite runs-on: ubuntu-latest - timeout-minutes: 25 + timeout-minutes: 30 needs: redirect if: vars.GCP_TARGET_PROJECT != '' && vars.UDMI_REGISTRY_SUFFIX == '' env: diff --git a/docs/specs/sequences/generated.md b/docs/specs/sequences/generated.md index 2e0605835a..9016c34768 100644 --- a/docs/specs/sequences/generated.md +++ b/docs/specs/sequences/generated.md @@ -27,11 +27,20 @@ Some caveats: --> +* [device_config_acked](#device_config_acked): Check that the device MQTT-acknowledges a sent config. * [empty_enumeration](#empty_enumeration) * [extra_config](#extra_config): Check that the device correctly handles an extra out-of-schema field * [feature_enumeration](#feature_enumeration) +* [pointset_publish_interval](#pointset_publish_interval): test sample rate and sample limit sec +* [pointset_sample_rate](#pointset_sample_rate): device publishes pointset events at a rate of no more than config sample_rate_sec * [system_last_update](#system_last_update): Check that last_update state is correctly set in response to a config update. +## device_config_acked (BETA) + +Check that the device MQTT-acknowledges a sent config. + +1. Wait for config acked + ## empty_enumeration (PREVIEW) 1. Update config before enumeration not active: @@ -85,6 +94,32 @@ Check that the device correctly handles an extra out-of-schema field 1. Check that all enumerated features are official buckets 1. Check that no point enumeration +## pointset_publish_interval (BETA) + +test sample rate and sample limit sec + +1. Update config before receive at least 4 pointset events: + * Add `pointset.sample_rate_sec` = `8` + * Add `pointset.sample_limit_sec` = `5` +1. Wait for receive at least 4 pointset events +1. Check that time period between successive pointset events is between 5 and 8 seconds +1. Update config before receive at least 4 pointset events: + * Set `pointset.sample_rate_sec` = `18` + * Set `pointset.sample_limit_sec` = `15` +1. Wait for receive at least 4 pointset events +1. Check that time period between successive pointset events is between 15 and 18 seconds + +## pointset_sample_rate (BETA) + +device publishes pointset events at a rate of no more than config sample_rate_sec + +1. Wait for measure initial sample rate +1. Update config before receive at least 5 pointset events: + * Add `pointset.sample_rate_sec` = `5` + * Add `pointset.sample_limit_sec` = `1` +1. Wait for receive at least 5 pointset events +1. Check that time period between successive pointset events is between 1 and 5 seconds + ## system_last_update (STABLE) Check that last_update state is correctly set in response to a config update. diff --git a/etc/sequencer.out b/etc/sequencer.out index 379fee3345..e2fe2a3d51 100644 --- a/etc/sequencer.out +++ b/etc/sequencer.out @@ -11,10 +11,10 @@ RESULT pass enumeration multi_enumeration ALPHA 5 Sequence complete RESULT pass enumeration.families family_enumeration ALPHA 5 Sequence complete RESULT pass enumeration.features feature_enumeration PREVIEW 5 Sequence complete RESULT pass enumeration.pointset pointset_enumeration ALPHA 5 Sequence complete -RESULT pass pointset pointset_publish_interval ALPHA 5 Sequence complete -RESULT pass pointset pointset_sample_rate ALPHA 5 Sequence complete +RESULT pass pointset pointset_publish_interval BETA 5 Sequence complete +RESULT pass pointset pointset_sample_rate BETA 5 Sequence complete RESULT pass system broken_config ALPHA 5 Sequence complete -RESULT pass system device_config_acked ALPHA 5 Sequence complete +RESULT pass system device_config_acked BETA 5 Sequence complete RESULT pass system extra_config BETA 5 Sequence complete RESULT pass system system_last_update STABLE 5 Sequence complete RESULT pass system system_min_loglevel ALPHA 5 Sequence complete diff --git a/etc/test_itemized.out b/etc/test_itemized.out index 7b0cbe78d6..d4d0cd30a1 100644 --- a/etc/test_itemized.out +++ b/etc/test_itemized.out @@ -4,7 +4,7 @@ TEST endpoint_failure_and_restart RESULT fail endpoint endpoint_failure_and_rest TEST valid_serial_no noLastStart RESULT pass system valid_serial_no ALPHA 5 Sequence complete TEST writeback_success noWriteback RESULT fail writeback writeback_success ALPHA 5 timeout waiting for point filter_differential_pressure_setpoint to have value_state applied TEST writeback_success noPointState RESULT fail writeback writeback_success ALPHA 5 timeout waiting for point filter_differential_pressure_setpoint to have value_state applied -TEST pointset_sample_rate fixedSampleRate=10 RESULT fail pointset pointset_sample_rate ALPHA 5 Failed check that time period between successive pointset events is between 1 and 5 seconds +TEST pointset_sample_rate fixedSampleRate=10 RESULT fail pointset pointset_sample_rate BETA 5 Failed check that time period between successive pointset events is between 1 and 5 seconds TEST system_mode_restart noPersist RESULT fail system.mode system_mode_restart ALPHA 5 Failed check that restart count increased by one TEST broken_config barfConfig RESULT fail system broken_config ALPHA 5 timeout waiting for log category `system.config.receive` level `DEBUG` was logged TEST system_last_update extraField=fnooz RESULT pass system system_last_update STABLE 5 Sequence complete diff --git a/pubber/src/main/java/daq/pubber/SupportedFeatures.java b/pubber/src/main/java/daq/pubber/SupportedFeatures.java index f234716937..1031cc96a9 100644 --- a/pubber/src/main/java/daq/pubber/SupportedFeatures.java +++ b/pubber/src/main/java/daq/pubber/SupportedFeatures.java @@ -6,6 +6,8 @@ import static udmi.schema.Bucket.ENUMERATION_FAMILIES; import static udmi.schema.Bucket.ENUMERATION_FEATURES; import static udmi.schema.Bucket.ENUMERATION_POINTSET; +import static udmi.schema.Bucket.POINTSET; +import static udmi.schema.Bucket.SYSTEM; import static udmi.schema.Bucket.UNKNOWN_DEFAULT; import static udmi.schema.FeatureEnumeration.FeatureStage.ALPHA; import static udmi.schema.FeatureEnumeration.FeatureStage.BETA; @@ -33,6 +35,8 @@ public abstract class SupportedFeatures { add(ENUMERATION_FEATURES, BETA); add(ENUMERATION_FAMILIES, PREVIEW); add(ENUMERATION_POINTSET, ALPHA); + add(POINTSET, BETA); + add(SYSTEM, BETA); } private static void add(Bucket featureBucket, FeatureStage stage) { diff --git a/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java b/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java index 3897263f4b..779ac80a0f 100644 --- a/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java +++ b/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java @@ -71,7 +71,7 @@ public void system_min_loglevel() { } @Test(timeout = TWO_MINUTES_MS) - @Feature(stage = ALPHA, bucket = SYSTEM) + @Feature(stage = BETA, bucket = SYSTEM) @Summary("Check that the device MQTT-acknowledges a sent config.") public void device_config_acked() { untilTrue("config acked", () -> configAcked); diff --git a/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/PointsetSequences.java b/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/PointsetSequences.java index 1d94b498e7..f50f1bcbed 100644 --- a/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/PointsetSequences.java +++ b/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/PointsetSequences.java @@ -2,7 +2,7 @@ import static com.google.daq.mqtt.util.TimePeriodConstants.THREE_MINUTES_MS; import static udmi.schema.Bucket.POINTSET; -import static udmi.schema.FeatureEnumeration.FeatureStage.ALPHA; +import static udmi.schema.FeatureEnumeration.FeatureStage.BETA; import com.google.daq.mqtt.sequencer.Feature; import com.google.daq.mqtt.sequencer.SequenceBase; @@ -35,7 +35,7 @@ public class PointsetSequences extends SequenceBase { * Skip if: initial interval < 5s (too fast for automated test) */ @Test(timeout = THREE_MINUTES_MS) - @Feature(stage = ALPHA, bucket = POINTSET) + @Feature(stage = BETA, bucket = POINTSET) @Summary("device publishes pointset events at a rate of no more than config sample_rate_sec") public void pointset_sample_rate() { Integer defaultSampleRate = 10; @@ -97,7 +97,7 @@ private String samplingMessagesCheckMessage(SamplingRange samplingRange) { */ @Test(timeout = THREE_MINUTES_MS) @Summary("test sample rate and sample limit sec") - @Feature(stage = ALPHA, bucket = POINTSET) + @Feature(stage = BETA, bucket = POINTSET) public void pointset_publish_interval() { if (deviceConfig.pointset == null) { diff --git a/validator/src/test/java/com/google/daq/mqtt/sequencer/SequenceRunnerTest.java b/validator/src/test/java/com/google/daq/mqtt/sequencer/SequenceRunnerTest.java index d48de6761d..fa8ff4ccb1 100644 --- a/validator/src/test/java/com/google/daq/mqtt/sequencer/SequenceRunnerTest.java +++ b/validator/src/test/java/com/google/daq/mqtt/sequencer/SequenceRunnerTest.java @@ -24,7 +24,7 @@ public class SequenceRunnerTest { // Minimum number of tests expected. This is a "low-water mark" to be increased as appropriate // when new tests are added. Only tracks tests marked as non-ALPHA. // TODO: Dynamically pull this count from the etc/sequencer.out file. - private static final int TEST_COUNT_MIN = 2; + private static final int TEST_COUNT_MIN = 5; private static final int SITE_COUNT_MIN = TEST_COUNT_MIN * MODEL_DEVICE_COUNT; private static void assertTestCount(int runCount, int countMin) {