lordgamez commented on a change in pull request #1284:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1284#discussion_r830880280
##########
File path: extensions/http-curl/tests/C2ClearCoreComponentStateTest.cpp
##########
@@ -51,10 +51,21 @@ class VerifyC2ClearCoreComponentState : public VerifyC2Base
{
protected:
void updateProperties(minifi::FlowController& flow_controller) override {
-
dynamic_cast<minifi::state::ProcessorController*>(flow_controller.getComponents("TailFile1")[0])
- ->getProcessor()->setProperty(minifi::processors::TailFile::FileName,
test_file_1_);
-
dynamic_cast<minifi::state::ProcessorController*>(flow_controller.getComponents("TailFile2")[0])
- ->getProcessor()->setProperty(minifi::processors::TailFile::FileName,
test_file_2_);
+ size_t componentIdx = 0;
+ auto setFileName = [&componentIdx] (const std::string& fileName,
minifi::state::StateController* component){
Review comment:
Could you please elaborate on the purpose of the `componentIdx` here?
What I see that during the test in both cases it is called with the value 0,
why the check and the reset of the counter is needed?
--
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]