You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2016/05/11 06:10:17 UTC
[2/3] camel git commit: CAMEL-9957 Fixed the build error of
KafkaProducerTest
CAMEL-9957 Fixed the build error of KafkaProducerTest
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/03a05be9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/03a05be9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/03a05be9
Branch: refs/heads/camel-2.17.x
Commit: 03a05be91fe2b40c28bfb4e6cd3d24ae4f3efb70
Parents: 733d45f
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed May 11 14:08:08 2016 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed May 11 14:08:08 2016 +0800
----------------------------------------------------------------------
.../java/org/apache/camel/component/kafka/KafkaProducerTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/03a05be9/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java
index ef57594..68798f3 100644
--- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java
@@ -85,7 +85,7 @@ public class KafkaProducerTest {
endpoint.setTopic("sometopic");
// setup the exception here
org.apache.kafka.clients.producer.KafkaProducer kp = producer.getKafkaProducer();
- Mockito.when(kp.send(Mockito.any())).thenThrow(new ApiException());
+ Mockito.when(kp.send(Mockito.any(ProducerRecord.class))).thenThrow(new ApiException());
Mockito.when(exchange.getIn()).thenReturn(in);
in.setHeader(KafkaConstants.PARTITION_KEY, "4");
@@ -115,7 +115,7 @@ public class KafkaProducerTest {
// setup the exception here
org.apache.kafka.clients.producer.KafkaProducer kp = producer.getKafkaProducer();
- Mockito.when(kp.send(Mockito.any(), Mockito.any())).thenThrow(new ApiException());
+ Mockito.when(kp.send(Mockito.any(ProducerRecord.class), Mockito.any(Callback.class))).thenThrow(new ApiException());
in.setHeader(KafkaConstants.PARTITION_KEY, "4");