lordgamez commented on code in PR #2061:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2061#discussion_r2661927485
##########
extensions/standard-processors/tests/features/defragtextflowfiles.feature:
##########
@@ -28,18 +26,20 @@ Feature: DefragmentText can defragment fragmented data from
TailFile
And a file with filename "test_file_two.log" and content "<input_two>" is
present in "/tmp/input"
And a DefragmentText processor with the "Pattern" property set to
"<pattern>"
And the "Pattern Location" property of the DefragmentText processor is set
to "<pattern location>"
+ And DefragmentText is EVENT_DRIVEN
And a PutFile processor with the name "SuccessPut" and the "Directory"
property set to "/tmp/output"
+ And SuccessPut is EVENT_DRIVEN
And the "success" relationship of the MultiTail processor is connected to
the DefragmentText
And the "success" relationship of the DefragmentText processor is
connected to the SuccessPut
-
+ And SuccessPut's success relationship is auto-terminated
When all instances start up
- Then flowfiles with these contents are placed in the monitored directory
in less than 60 seconds: "<success_flow_files>"
+ Then the contents of /tmp/output in less than 60 seconds are:
"<success_flow_files>"
Examples:
| input_one | input_two
| pattern | pattern location |
success_flow_files |
| <1>cat%dog%mouse%<2>apple%banana%<3>English% |
<1>Katze%Hund%Maus%<2>Apfel%Banane%<3>Deutsch% | <[0-9]+> | Start of
Message |
<1>cat%dog%mouse%,<1>Katze%Hund%Maus%,<2>apple%banana%,<2>Apfel%Banane% |
- | <1>cat%dog%mouse%<2>apple%banana%<3>English% |
<1>Katze%Hund%Maus%<2>Apfel%Banane%<3>Deutsch% | <[0-9]+> | End of
Message |
<1>,cat%dog%mouse%<2>,Katze%Hund%Maus%<2>,apple%banana%<3>,Apfel%Banane%<3> |
+ | <1>cat%dog%mouse%<2>apple%banana%<3>English% |
<1>Katze%Hund%Maus%<2>Apfel%Banane%<3>Deutsch% | <[0-9]+> | End of
Message |
<1>,<1>,cat%dog%mouse%<2>,Katze%Hund%Maus%<2>,apple%banana%<3>,Apfel%Banane%<3>
|
Review Comment:
I'm not sure adding additional tests just to test the test framework is a
good way to go. Especially in system tests where setting up an environment is
time and resource heavy. Maybe some unit tests could be added to some more
complex test utilities.
In this case my guess is that the previous framework was checking if a
specific output is present in the output file (e.g. `"output" in file_content`)
and because the expected output was a substring of the actual output, the test
case succeeded. Now we are checking for an exact match and that's why the check
with the original expectation failed.
--
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]