martinzink commented on code in PR #2064:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2064#discussion_r2518207880
##########
libminifi/test/libtest/unit/TestBase.cpp:
##########
@@ -125,27 +125,27 @@ bool LogTestController::contains(const
std::function<std::string()>& log_string_
return found;
}
-std::optional<std::smatch> LogTestController::matchesRegex(const std::string&
regex_str, std::chrono::milliseconds timeout, std::chrono::milliseconds
sleep_interval) const {
+std::optional<std::vector<std::string>> LogTestController::matchesRegex(const
std::string& regex_str, const std::chrono::milliseconds timeout, const
std::chrono::milliseconds sleep_interval) const {
if (regex_str.empty()) {
return std::nullopt;
}
- auto start = std::chrono::steady_clock::now();
- bool found = false;
- bool timed_out = false;
- std::regex matcher_regex(regex_str);
- std::smatch match;
- do {
- std::string str = getLogs();
Review Comment:
The problem was that resulting smatch contained iterator to this str
--
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]