You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "adamdebreceni (via GitHub)" <gi...@apache.org> on 2023/02/13 12:46:15 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1502: MINIFICPP-2034 Cache the results of the username lookups in ConsumeWindowsEventLog

adamdebreceni commented on code in PR #1502:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1502#discussion_r1104422120


##########
extensions/windows-event-log/tests/MetadataWalkerTests.cpp:
##########
@@ -150,10 +141,11 @@ void extractMappingsTestHelper(const std::string &file_name,
   REQUIRE(!input_xml.empty());
   pugi::xml_document doc;
   pugi::xml_parse_result result = doc.load_string(input_xml.c_str());
-  CHECK(result);
+  REQUIRE(result);
 
   auto regex = utils::Regex(".*Sid");
-  MetadataWalker walker(FakeWindowsEventLogMetadata{}, METADATA_WALKER_TESTS_LOG_NAME, update_xml, resolve, &regex);
+  auto user_id_to_username = [](const std::string& user_id) { return utils::OsUtils::userIdToUsername(user_id); };
+  MetadataWalker walker(FakeWindowsEventLogMetadata{}, METADATA_WALKER_TESTS_LOG_NAME, update_xml, resolve, &regex, user_id_to_username);

Review Comment:
   is wrapping the `userIdToUsername` in a lambda required?



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org