This is an automated email from the ASF dual-hosted git repository.

ijuma pushed a commit to branch trunk
in repository

The following commit(s) were added to refs/heads/trunk by this push:
     new e4d652b  MINOR: Fix AsyncProducerTest bug that hits when logging is 
turned up (#4450)
e4d652b is described below

commit e4d652befe3a4ac126dced9144c1b694e7334a94
Author: Colin Patrick McCabe <>
AuthorDate: Wed Apr 11 14:50:11 2018 -0700

    MINOR: Fix AsyncProducerTest bug that hits when logging is turned up (#4450)
    AsyncProducerTest gets an error about an incorrect mock when the logging
    level is turned up.  Instead of usIng a mock, just create a real
    SyncProducerConfig object, since the object is simple to create.
    Reviewers: Ismael Juma <>
 core/src/test/scala/unit/kafka/producer/AsyncProducerTest.scala | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/producer/AsyncProducerTest.scala 
index 74f3ad1..370a1ad 100755
--- a/core/src/test/scala/unit/kafka/producer/AsyncProducerTest.scala
+++ b/core/src/test/scala/unit/kafka/producer/AsyncProducerTest.scala
@@ -404,8 +404,11 @@ class AsyncProducerTest {
       Map((TopicAndPartition("topic1", 0), ProducerResponseStatus(Errors.NONE, 
     val mockSyncProducer = EasyMock.createMock(classOf[SyncProducer])
     // don't care about config mock
-    val mockConfig = EasyMock.createNiceMock(classOf[SyncProducerConfig])
-    EasyMock.expect(mockSyncProducer.config).andReturn(mockConfig).anyTimes()
+    val myProps = new Properties()
+    myProps.put("host", "localhost")
+    myProps.put("port", "9092")
+    val myConfig = new SyncProducerConfig(myProps)
+    EasyMock.expect(mockSyncProducer.config).andReturn(myConfig).anyTimes()
RuntimeException) // simulate SocketTimeoutException

To stop receiving notification emails like this one, please contact

Reply via email to