fgerlits commented on code in PR #2157:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2157#discussion_r3087211215


##########
extensions/systemd/tests/ConsumeJournaldTest.cpp:
##########
@@ -164,8 +160,11 @@ TEST_CASE("ConsumeJournald", "[consumejournald]") {
       minifi::core::ProcessorMetadata{utils::Identifier{}, "ConsumeJournald", 
core::logging::LoggerFactory<ConsumeJournald>::getLogger()},
       std::move(libwrapper)), "ConsumeJournald");
   REQUIRE(consume_journald->setProperty(ConsumeJournald::TimestampFormat.name, 
"ISO8601"));
-  const auto get_cursor_position = [&consume_journald]() -> std::string {
-    return 
ConsumeJournaldTestAccessor::get_state_manager_(consume_journald.get())->get()->at("cursor");
+  const auto get_cursor_position = [&plan, &consume_journald]() -> std::string 
{
+    auto sm = 
plan->getProcessContextForProcessor(consume_journald)->createStateManager();
+    std::unordered_map<std::string, std::string> state;
+    sm->get(state);
+    return state.at("cursor");

Review Comment:
   Nitpicking, but why did this change from `->get()->at("cursor")` to this?
   
   Also, I wouldn't mind a few `REQUIRE`s to check for null, but since they 
weren't there before, I don't insist.



-- 
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