faucetsdn / udmi

Universal Device Management Interface (UDMI) provides a high-level specification for the management and operation of physical IoT systems.

Home Page:https://faucetsdn.github.io/udmi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sequencer Config Validator - broken_config and extra_config tests necessarily fail

DollyGodet opened this issue · comments

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.

I think this is also included in your issue #386

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