Skip to content
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

Sequencer Config Validator - broken_config and extra_config tests necessarily fail #385

Open
DollyGodet opened this issue Jul 7, 2022 · 3 comments

Comments

@DollyGodet
Copy link

In the class com.google.daq.mqtt.validator.validations.ConfigValidator, the tests broken_config and extra_config necessarily fail :

In the test setup (com.google.daq.mqtt.validator.SequenceValidator#setUp), the field min_loglevel of the device config is set to 400.
According to the documentation, this means that the device will not report log messages with a level greater than 400 (Level.WARNING).

The tests broken_config and extra_config necessarily fail, because they expect to receive log messages with a level of 200 (Level.INFO). This is less than 400, so the device will not send log messages with a level of 200 and the tests necessarily fail.

@noursaidi
Copy link
Collaborator

I think this is also included in your issue #386

@noursaidi
Copy link
Collaborator

I've taken a look, and it does look like there's something wrong. In my testing, the config loglevel later gets set to 300, but then expects a log entry with a loglevel of 200.

@grafnu I think the loglevel needs to be set to 100, and also Pubber checked as I can pass the test with pubber, so it looks like it's not respecting the min_loglevel?


2022-07-12T14:28:36Z DEBUG sequencer Updated config:
{
  "timestamp" : "2022-07-12T14:28:26Z",
  "version" : "1.3.13-90-g62cf3663-dirty",
  "system" : {
    "min_loglevel" : 300,
    "metrics_rate_sec" : 600
  }
}
2022-07-12T14:28:36Z TRACE sequencer received local_config_2022-07-12T14:28:36Z:
{
  "timestamp" : "2022-07-12T14:28:26Z",
  "version" : "1.3.13-90-g62cf3663-dirty",
  "system" : {
    "min_loglevel" : 300,
    "metrics_rate_sec" : 600
  }
}
2022-07-12T14:28:36Z INFO sequencer finished waiting for device config reset
2022-07-12T14:28:36Z DEBUG sequencer system config extra field null
2022-07-12T14:28:36Z TRACE sequencer received local_system_2022-07-12T14:28:36Z:
{
  "min_loglevel" : 300,
  "metrics_rate_sec" : 600,
  "nonce" : 1657636116412
}
2022-07-12T14:28:36Z DEBUG sequencer update config_system
2022-07-12T14:28:38Z INFO sequencer start waiting for waiting for log message system.config.receive level INFO

@grafnu
Copy link
Collaborator

grafnu commented Jul 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants