[ https://issues.apache.org/jira/browse/FLINK-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351104#comment-15351104 ]
ASF GitHub Bot commented on FLINK-4053: --------------------------------------- Github user zentol commented on the issue: https://github.com/apache/flink/pull/2128 I tihnk this looks good. One remark for future contributions though: I think some of your tests are too specific. These include `openCallDeclaresQueue`, `throwExceptionIfChannelIsNull` and `invokePublishBytesToQueue`. Effectively you are not testing functionality but putting a lock on every single line of the implementation. We will now get a test failure (which _should_ mean that the functionality is broken) if we change the exception message (or even handle it completely), use a different `basicPublish` method (or pass different arguments) or pass different `queueDeclare` arguments. > Return value from Connection should be checked against null > ----------------------------------------------------------- > > Key: FLINK-4053 > URL: https://issues.apache.org/jira/browse/FLINK-4053 > Project: Flink > Issue Type: Bug > Reporter: Ted Yu > Assignee: Ivan Mushketyk > Priority: Minor > > In RMQSource.java and RMQSink.java, there is code in the following pattern: > {code} > connection = factory.newConnection(); > channel = connection.createChannel(); > {code} > According to > https://www.rabbitmq.com/releases/rabbitmq-java-client/current-javadoc/com/rabbitmq/client/Connection.html#createChannel() > : > {code} > Returns: > a new channel descriptor, or null if none is available > {code} > The return value should be checked against null. -- This message was sent by Atlassian JIRA (v6.3.4#6332)