lordgamez commented on code in PR #2059:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2059#discussion_r2660985459
##########
extensions/kafka/tests/features/consumekafka.feature:
##########
@@ -19,54 +19,55 @@ Feature: Receiving data from using Kafka streaming platform
using ConsumeKafka
As a user of MiNiFi
I need to have ConsumeKafka processor
- Background:
- Given the content of "/tmp/output" is monitored
-
Scenario Outline: ConsumeKafka parses and uses kafka topics and topic name
formats
- Given a ConsumeKafka processor set up in a "kafka-consumer-flow" flow
+ Given a Kafka server is set up
+ And ConsumeKafka processor is set up to communicate with that server
And the "Topic Names" property of the ConsumeKafka processor is set to
"<topic names>"
And the "Topic Name Format" property of the ConsumeKafka processor is set
to "<topic name format>"
And the "Offset Reset" property of the ConsumeKafka processor is set to
"earliest"
- And a PutFile processor with the "Directory" property set to "/tmp/output"
in the "kafka-consumer-flow" flow
+ And a PutFile processor with the "Directory" property set to "/tmp/output"
+ And PutFile is EVENT_DRIVEN
And the "success" relationship of the ConsumeKafka processor is connected
to the PutFile
+ And PutFile's success relationship is auto-terminated
- And a kafka broker is set up in correspondence with the third-party kafka
publisher
- And the kafka broker is started
+ And the Kafka server is started
And the topic "ConsumeKafkaTest" is initialized on the kafka broker
When a message with content "<message 1>" is published to the
"ConsumeKafkaTest" topic
- And all other processes start up
+ And the MiNiFi instance starts up
And a message with content "<message 2>" is published to the
"ConsumeKafkaTest" topic
- Then two flowfiles with the contents "<message 1>" and "<message 2>" are
placed in the monitored directory in less than 90 seconds
+ Then the contents of "/tmp/output" in less than 30 seconds are: "<message
1>" and "<message 2>"
Examples: Topic names and formats to test
| message 1 | message 2 | topic names
| topic name format |
- | Ulysses | James Joyce | ConsumeKafkaTest
| (not set) |
| The Great Gatsby | F. Scott Fitzgerald | ConsumeKafkaTest
| Names |
| War and Peace | Lev Tolstoy | a,b,c,ConsumeKafkaTest,d
| Names |
| Nineteen Eighty Four | George Orwell | ConsumeKafkaTest
| Patterns |
| Hamlet | William Shakespeare | Cons[emu]*KafkaTest
| Patterns |
Scenario Outline: ConsumeKafka key attribute is encoded according to the
"Key Attribute Encoding" property
- Given a ConsumeKafka processor set up in a "kafka-consumer-flow" flow
+ Given a Kafka server is set up
+ And ConsumeKafka processor is set up to communicate with that server
And the "Key Attribute Encoding" property of the ConsumeKafka processor is
set to "<key attribute encoding>"
- And a RouteOnAttribute processor in the "kafka-consumer-flow" flow
- And a LogAttribute processor in the "kafka-consumer-flow" flow
- And a PutFile processor with the "Directory" property set to "/tmp/output"
in the "kafka-consumer-flow" flow
+ And a RouteOnAttribute processor
+ And RouteOnAttribute is EVENT_DRIVEN
+ And a LogAttribute processor
+ And LogAttribute is EVENT_DRIVEN
+ And a PutFile processor with the "Directory" property set to "/tmp/output"
+ And PutFile is EVENT_DRIVEN
Review Comment:
Unfortunately with the new framework we do not know which is a source
processor and which is not. Previously we had separate classes for each
processor where these attributes could be specified, but now we only have their
name to work with and only the flow configuration is generated without any
processor objects. It's a bit of a hassle, but @martinzink's intention was to
have this framework be more explicit in the test steps.
--
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]