-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @Feature annotation with categories #566
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d5a41a3
Adding feature categories
grafnu 5f80444
Adding additional test categories
grafnu 9f92978
Fix javadoc
grafnu 39938fe
Cleaning up acceptance
grafnu e5a94e4
Fix itemized
grafnu 34e82e1
Merge branch 'master' into features
grafnu 29eb255
Updating with fewer categories
grafnu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
RESULT pass broken_config Sequence complete | ||
RESULT pass device_config_acked Sequence complete | ||
RESULT pass empty_enumeration ALPHA Sequence complete | ||
RESULT pass endpoint_connection_bad_hash Sequence complete | ||
RESULT pass endpoint_connection_error Sequence complete | ||
RESULT pass endpoint_connection_retry Sequence complete | ||
RESULT pass endpoint_connection_success_alternate Sequence complete | ||
RESULT pass endpoint_connection_success_reconnect Sequence complete | ||
RESULT pass extra_config Sequence complete | ||
RESULT pass family_enumeration ALPHA Sequence complete | ||
RESULT pass feature_enumeration ALPHA Sequence complete | ||
RESULT pass multi_enumeration ALPHA Sequence complete | ||
RESULT pass periodic_scan Sequence complete | ||
RESULT pass pointset_enumeration ALPHA Sequence complete | ||
RESULT pass pointset_publish_interval ALPHA Sequence complete | ||
RESULT pass pointset_sample_rate ALPHA Sequence complete | ||
RESULT pass single_scan Sequence complete | ||
RESULT pass system_last_update Sequence complete | ||
RESULT pass system_min_loglevel BETA Sequence complete | ||
RESULT pass system_mode_restart PREVIEW Sequence complete | ||
RESULT pass valid_serial_no Sequence complete | ||
RESULT pass valid_serial_no Sequence complete | ||
RESULT pass valid_serial_no Sequence complete | ||
RESULT pass valid_serial_no Sequence complete | ||
RESULT pass writeback_failure Sequence complete | ||
RESULT pass writeback_invalid Sequence complete | ||
RESULT pass writeback_success Sequence complete | ||
RESULT pass discovery.scan periodic_scan REQUIRED 5 Sequence complete | ||
RESULT pass enumeration empty_enumeration ALPHA 5 Sequence complete | ||
RESULT pass enumeration.families family_enumeration ALPHA 5 Sequence complete | ||
RESULT pass enumeration.features feature_enumeration ALPHA 5 Sequence complete | ||
RESULT pass enumeration.pointset pointset_enumeration ALPHA 5 Sequence complete | ||
RESULT pass unknown broken_config REQUIRED 5 Sequence complete | ||
RESULT pass unknown device_config_acked REQUIRED 5 Sequence complete | ||
RESULT pass unknown endpoint_connection_bad_hash REQUIRED 5 Sequence complete | ||
RESULT pass unknown endpoint_connection_error REQUIRED 5 Sequence complete | ||
RESULT pass unknown endpoint_connection_retry REQUIRED 5 Sequence complete | ||
RESULT pass unknown endpoint_connection_success_alternate REQUIRED 5 Sequence complete | ||
RESULT pass unknown endpoint_connection_success_reconnect REQUIRED 5 Sequence complete | ||
RESULT pass unknown extra_config REQUIRED 5 Sequence complete | ||
RESULT pass unknown multi_enumeration ALPHA 5 Sequence complete | ||
RESULT pass unknown pointset_publish_interval ALPHA 5 Sequence complete | ||
RESULT pass unknown pointset_sample_rate ALPHA 5 Sequence complete | ||
RESULT pass unknown single_scan REQUIRED 5 Sequence complete | ||
RESULT pass unknown system_last_update REQUIRED 5 Sequence complete | ||
RESULT pass unknown system_min_loglevel BETA 5 Sequence complete | ||
RESULT pass unknown system_mode_restart PREVIEW 5 Sequence complete | ||
RESULT pass unknown valid_serial_no REQUIRED 5 Sequence complete | ||
RESULT pass unknown valid_serial_no REQUIRED 5 Sequence complete | ||
RESULT pass unknown valid_serial_no REQUIRED 5 Sequence complete | ||
RESULT pass unknown valid_serial_no REQUIRED 5 Sequence complete | ||
RESULT pass unknown writeback_failure REQUIRED 5 Sequence complete | ||
RESULT pass unknown writeback_invalid REQUIRED 5 Sequence complete | ||
RESULT pass unknown writeback_success REQUIRED 5 Sequence complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TEST writeback_success noWriteback RESULT fail writeback_success timeout waiting for point filter_differential_pressure_setpoint to have value_state applied | ||
TEST writeback_success noPointState RESULT fail writeback_success timeout waiting for point filter_differential_pressure_setpoint to have value_state applied | ||
TEST pointset_sample_rate fixedSampleRate=10 RESULT fail pointset_sample_rate ALPHA Failed check that time period between successive pointset events is between 1 and 5 seconds | ||
TEST writeback_success noWriteback RESULT fail unknown writeback_success REQUIRED 5 timeout waiting for point filter_differential_pressure_setpoint to have value_state applied | ||
TEST writeback_success noPointState RESULT fail unknown writeback_success REQUIRED 5 timeout waiting for point filter_differential_pressure_setpoint to have value_state applied | ||
TEST pointset_sample_rate fixedSampleRate=10 RESULT fail unknown pointset_sample_rate ALPHA 5 Failed check that time period between successive pointset events is between 1 and 5 seconds |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
validator/src/main/java/com/google/daq/mqtt/sequencer/Feature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.google.daq.mqtt.sequencer; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Feature designation for line-item tests. | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.METHOD}) | ||
public @interface | ||
Feature { | ||
String IMPLICIT_CATEGORY = ""; | ||
Stage DEFAULT_STAGE = Stage.REQUIRED; | ||
int DEFAULT_SCORE = 5; | ||
|
||
/** | ||
* Defines the category for this feature, as defined by a named attribute. | ||
* | ||
* @return feature category using named attribute | ||
*/ | ||
String category() default IMPLICIT_CATEGORY; | ||
|
||
/** | ||
* Defines the category for this feature, as defined by an implicit attribute. | ||
* | ||
* @return feature category using implicit argument | ||
*/ | ||
String value() default IMPLICIT_CATEGORY; | ||
|
||
/** | ||
* Default value is REQUIRED which should be the end-state for all tests. | ||
* | ||
* @return annotated release stage of this test | ||
*/ | ||
Stage stage() default Stage.REQUIRED; | ||
|
||
/** | ||
* Defines the feature score for this test, in AU. | ||
* | ||
* @return feature score value | ||
*/ | ||
int score() default DEFAULT_SCORE; | ||
|
||
/** | ||
* Enum of allowed stages. | ||
*/ | ||
enum Stage { | ||
ALPHA, | ||
REQUIRED | ||
} | ||
} |
31 changes: 0 additions & 31 deletions
31
validator/src/main/java/com/google/daq/mqtt/sequencer/FeatureStage.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a doc that pinpoints what each of these stages means to the UDMI project? For example ALPHA vs PREVIEW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also occurs to me, should "REQUIRED" be renamed "RELEASE"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to scope this PR at the mechanism for specifying the properties, but not the properties themselves (leave changing that to a separate PR). Once this PR is in place, it's easy to add/change the values themselves, and/or the properties associated with any given feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you change the enum to just one placeholder value I'm good with that. Then we can go back and edit the real values in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about two -- I'd like to keep default and non-default since the code/output is different in those two cases! Updated, PTAL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok...as long as we can change REQUIRED to a different label if needed lgtm