szaszm commented on code in PR #1490:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1490#discussion_r1132545897


##########
libminifi/test/unit/MetricsTests.cpp:
##########
@@ -126,6 +126,15 @@ TEST_CASE("RepositorymetricsHaveRepo", "[c2m4]") {
 
     REQUIRE("size" == size.name);
     REQUIRE("0" == size.value);
+
+    minifi::state::response::SerializedResponseNode max_size = 
resp.children.at(3);

Review Comment:
   Could we convert this to a search, instead of using fixed offsets in the 
response node? Just to future-proof the test, in case a new metric is added 
later.



##########
libminifi/src/core/state/nodes/ResponseNodeLoader.cpp:
##########
@@ -32,11 +32,12 @@
 
 namespace org::apache::nifi::minifi::state::response {
 
-ResponseNodeLoader::ResponseNodeLoader(std::shared_ptr<Configure> 
configuration, std::shared_ptr<core::Repository> provenance_repo,
-    std::shared_ptr<core::Repository> flow_file_repo, 
std::shared_ptr<core::FlowConfiguration> flow_configuration)
+ResponseNodeLoader::ResponseNodeLoader(std::shared_ptr<Configure> 
configuration, std::shared_ptr<core::RepositoryMetricsSource> provenance_repo,
+      std::shared_ptr<core::RepositoryMetricsSource> flow_file_repo, 
std::shared_ptr<core::RepositoryMetricsSource> content_repo, 
std::shared_ptr<core::FlowConfiguration> flow_configuration)

Review Comment:
   Couln't we pass a range of metrics sources instead of the fixed number of 
repos?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to