Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lordgamez committed Jan 23, 2025
1 parent 1d6ac50 commit c74dd71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion libminifi/test/integration/C2MetricsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ class MetricsHandler: public HeartbeatHandler {
runtime_metrics["flowInfo"].HasMember("processorStatuses");
}

static bool verifyProcessorBulletins(const rapidjson::Value& runtime_metrics) {
return runtime_metrics["flowInfo"].HasMember("processorBulletins") &&
runtime_metrics["flowInfo"]["processorBulletins"].GetArray().Size() > 0;
}

static bool verifyRuntimeMetrics(const rapidjson::Value& runtime_metrics) {
return verifyCommonRuntimeMetricNodes(runtime_metrics, "2438e3c8-015a-1000-79ca-83af40ec1997") &&
[&]() {
Expand All @@ -173,7 +178,8 @@ class MetricsHandler: public HeartbeatHandler {
}
return processorMetricsAreValid(processor);
});
}();
}() &&
verifyProcessorBulletins(runtime_metrics);
}

static bool verifyUpdatedRuntimeMetrics(const rapidjson::Value& runtime_metrics) {
Expand Down
4 changes: 2 additions & 2 deletions libminifi/test/resources/TestC2Metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Processors:
penalization period: 30 sec
yield period: 10 sec
run duration nanos: 0
bulletin level: INFO
bulletin level: ERROR
auto-terminated relationships list:
Properties:
Endpoint List: localhost:8776
Expand All @@ -44,7 +44,7 @@ Processors:
scheduling period: 30 sec
penalization period: 30 sec
yield period: 1 sec
bulletin level: DEBUG
bulletin level: ERROR
run duration nanos: 0
auto-terminated relationships list:
- response
Expand Down

0 comments on commit c74dd71

Please sign in to comment.