tuteng opened a new issue #5920: [Pulsar IO]Add an integration test for 
rabbitmq source
URL: https://github.com/apache/pulsar/issues/5920
 
 
   **Is your feature request related to a problem? Please describe.**
   The current rabbitmq connector lacks an integration test, and we need to add 
it.
   
   **Describe the solution you'd like**
   At present, we have added relatively perfect integration tests to various 
connectors of the debezium, and we can refer to this 
https://github.com/apache/pulsar/blob/master/tests/integration/src/test/java/org/apache/pulsar/tests/integration/io/DebeziumPostgreSqlSourceTester.java
 to complete it.
   
   We can add tests through the following steps:
   
   1. Define a container file 
https://github.com/apache/pulsar/blob/master/tests/integration/src/test/java/org/apache/pulsar/tests/integration/containers/DebeziumMySQLContainer.java,
 add some environment variable.
   2. Initialize the container, I suggest using this container 
https://hub.docker.com/_/rabbitmq rabbitmq:3.8-management, because it includes 
the rabbitmqadmin tool, which is more convenient for later tests.
   3. Do some initialization operations in `prepareSource` function, such as 
initializing some users, permissions, etc.
   4. Add a test case to class 
https://github.com/apache/pulsar/blob/master/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java,
 just like MySQL and MongoDB.
   5. In the test case, use rabbitmqadmin tool to prepare some data and send it 
out, and then use the pulsar consumer to verify the data.
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to