You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/04 07:19:03 UTC

[GitHub] [flink] senegalo commented on a change in pull request #12056: [FLINK-17502] [flink-connector-rabbitmq] RMQSource refactor

senegalo commented on a change in pull request #12056:
URL: https://github.com/apache/flink/pull/12056#discussion_r499214594



##########
File path: flink-connectors/flink-connector-rabbitmq/src/test/java/org/apache/flink/streaming/connectors/rabbitmq/RMQSourceTest.java
##########
@@ -318,6 +320,36 @@ public void testConstructorParams() throws Exception {
 		assertEquals("passTest", testObj.getFactory().getPassword());
 	}
 
+	/**
+	 * Tests getting the correct body and correlationID given which constructor was called.
+	 * if the constructor with the {@link DeserializationSchema} was called it should extract the body of the message
+	 * from the {@link Delivery} and the correlation ID from the {@link AMQP.BasicProperties} which are
+	 * mocked to "I Love Turtles" and "0".
+	 * if the constructor with the {@link RMQDeserializationSchema} was called it uses the
+	 * {@link RMQDeserializationSchema#deserialize} method to parse the message and extract the correlation ID which
+	 * both are implemented in {@link RMQTestSource#initAMQPMocks()} to return the
+	 * {@link AMQP.BasicProperties#getMessageId()} that is mocked to return "1-MESSAGE_ID"
+	 */
+	@Test
+	public void testProcessMessage() throws Exception {

Review comment:
       Fixed all warnings but the unchecked generics. apparently that's a known issue: https://github.com/mockito/mockito/issues/1531




----------------------------------------------------------------
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:
users@infra.apache.org