lordgamez commented on code in PR #2103:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2103#discussion_r2904388153
##########
extensions/python/tests/features/python.feature:
##########
@@ -45,49 +46,66 @@ Feature: MiNiFi can use python processors in its flows
Scenario: Native python processor can read empty input stream
Given the example MiNiFi python processors are present
And a GenerateFlowFile processor with the "File Size" property set to "0B"
- And a MoveContentToJson processor
+ And the scheduling period of the GenerateFlowFile processor is set to "60
sec"
+ And a org.apache.nifi.minifi.processors.examples.MoveContentToJson
processor with the name "MoveContentToJson"
+ And MoveContentToJson is EVENT_DRIVEN
And a PutFile processor with the "Directory" property set to "/tmp/output"
+ And PutFile is EVENT_DRIVEN
And the "success" relationship of the GenerateFlowFile processor is
connected to the MoveContentToJson
And the "success" relationship of the MoveContentToJson processor is
connected to the PutFile
+ And PutFile's success relationship is auto-terminated
When all instances start up
- Then a flowfile with the content '{"content": ""}' is placed in the
monitored directory in less than 60 seconds
+ Then a single file with the content '{"content": ""}' is placed in the
'/tmp/output' directory in less than 60 seconds
Scenario: FlowFile can be removed from session
- Given a GenerateFlowFile processor with the "File Size" property set to
"0B"
- And a RemoveFlowFile processor
+ Given the example MiNiFi python processors are present
+ And a GenerateFlowFile processor with the "File Size" property set to "0B"
+ And a org.apache.nifi.minifi.processors.examples.RemoveFlowFile processor
with the name "RemoveFlowFile"
+ And RemoveFlowFile is EVENT_DRIVEN
+ And the "success" relationship of the GenerateFlowFile processor is
connected to the RemoveFlowFile
+ And RemoveFlowFile's success relationship is auto-terminated
When all instances start up
Then the Minifi logs contain the following message: "Removing flow file
with UUID" in less than 30 seconds
Scenario: Native python processors can be stateful
Given the example MiNiFi python processors are present
- And a CountingProcessor processor
+ And a org.apache.nifi.minifi.processors.examples.CountingProcessor
processor with the name "CountingProcessor"
And the scheduling period of the CountingProcessor processor is set to
"100 ms"
And a PutFile processor with the "Directory" property set to "/tmp/output"
+ And PutFile is EVENT_DRIVEN
And the "success" relationship of the CountingProcessor processor is
connected to the PutFile
+ And PutFile'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 5 seconds: "0,1,2,3,4,5"
+ Then files with at least these contents "1,2,3,4,5" are placed in the
"/tmp/output" directory in less than 5 seconds
Review Comment:
With the old framework we were not checking exact matching but instead
matching a substring of the output file, and when the counter reached 10, the 0
content would match that. Now this is fixed and we do not match only just a
substring.
--
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]