lordgamez commented on code in PR #2022:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2022#discussion_r2320156768


##########
libminifi/test/libtest/integration/IntegrationBase.cpp:
##########


Review Comment:
   The problem is that in some scenarios we use the same flow configuration 
file from different test processes and when the `FlowController` loads the 
configuration it encrypts the sensitive values and writes the encrypted 
configuration back to the file. Because of this when multiple test processes 
write the same file there can be a concurrency issues, usually the issue is one 
test reads the configuration file while the other test writes it and it sees 
the file being empty which causes the test failure. This fix copies the input 
flow configuration for each test process to a temporary directory where it is 
independently read and written for the test. 
   
   We do not reuse the last flow config path, just store it for checking it 
later on in some assertions like in the C2ConfigEncryption test. Usually in 
these C2 integration tests the `run()` is only called once for the harness, but 
if a new `run()` would be called on the harness, then the last flow config path 
would be replaced with the input `test_file_path`, the old temporary directory 
would be deleted and a new one created.



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