You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2021/11/26 11:23:00 UTC

[jira] [Updated] (CAMEL-17241) Incorrect exception test

     [ https://issues.apache.org/jira/browse/CAMEL-17241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otavio Rodolfo Piske updated CAMEL-17241:
-----------------------------------------
    Description: 
This [test|https://github.com/apache/camel/blob/main/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java#L131-L141] is a false positive. The code is throwing a NPE here: [https://github.com/apache/camel/blob/main/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java#L247]


But because it tests for the Exception.class the test pass. It should test for the ApiException.

 

 

 

 

  was:
This [test|https://github.com/apache/camel/blob/main/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java#L131-L141] is a false positive. The code is throwing a NPE here: https://github.com/apache/camel/blob/main/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java#L247

 

 

 

 

 


> Incorrect exception test
> ------------------------
>
>                 Key: CAMEL-17241
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17241
>             Project: Camel
>          Issue Type: Test
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>
> This [test|https://github.com/apache/camel/blob/main/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java#L131-L141] is a false positive. The code is throwing a NPE here: [https://github.com/apache/camel/blob/main/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java#L247]
> But because it tests for the Exception.class the test pass. It should test for the ApiException.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)