Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka - Pusblish message to a particalur partition for e2e testing #178

Closed
authorjapps opened this issue Dec 30, 2018 · 2 comments
Closed
Assignees

Comments

@authorjapps
Copy link
Owner

GIVEN a valid partition number of a topic
WHEN I load the message into the topic
THEN the message should arrive in that particular partition
AND I will will be able to assert the same by verifying the Ack.

e.g.

Asset the Ack
                    "topicPartition" : {
                        "partition" : 0,
                        "topic" : "demo-4"
                    }

the test step will look as below-

        {
            "name": "load_kafka",
            "url": "kafka-topic:demo-4",
            "operation": "produce",
            "request": {
                "records":[
                    {
                        "key": "${RANDOM.NUMBER}",
                        "value": "Hello World",
                        "partition": 0
                    }
                ]
            },
            "assertions": {
                "status" : "Ok",
                "recordMetadata" : {
                    "topicPartition" : {
                        "partition" : 0,
                        "topic" : "demo-4"
                    }
                }
            }
        }
@authorjapps
Copy link
Owner Author

authorjapps commented Jan 4, 2019

Implementation, Dev and Test -Done.

  • TODO is
    • HelloWorld
    • Wiki page on how to

@authorjapps
Copy link
Owner Author

Example added here to practice locally using IDE. Please start docker with kafka , before firing the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant