Skip to content

Commit

Permalink
Promote pointset_sample_rate, pointset_publish_interval, device_confi…
Browse files Browse the repository at this point in the history
…g_acked to BETA (#673)
  • Loading branch information
noursaidi committed Jun 27, 2023
1 parent b852806 commit 6c1efdf
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
35 changes: 35 additions & 0 deletions docs/specs/sequences/generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,20 @@ Some caveats:
-->

<!-- START GENERATED, do not edit anything after this line! -->
* [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:
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions etc/sequencer.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion etc/test_itemized.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions pubber/src/main/java/daq/pubber/SupportedFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6c1efdf

Please sign in to comment.