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

satishd pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4ea9394e7eb MINOR Fix the build failure (#14065)
4ea9394e7eb is described below

commit 4ea9394e7ebf71e2dcf96e9b96191dac253f4930
Author: Satish Duggana <[email protected]>
AuthorDate: Fri Jul 21 13:56:02 2023 +0530

    MINOR Fix the build failure (#14065)
    
    Fixing the build failure caused by the earlier commit 
https://github.com/apache/kafka/commit/27ea025e33aab525e96bef24840414f7a4e132f1
    
    
    ```
    [Error] 
/Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:3526:77:
 the result type of an implicit conversion must be more specific than Object
    [Error] 
/Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:3530:70:
 the result type of an implicit conversion must be more specific than Object
    [Warn] 
/Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala:23:21:
 imported `QuorumTestHarness` is permanently hidden by definition of object 
QuorumTestHarness in package server
    [Warn] 
/Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ServerGenerateClusterIdTest.scala:29:21:
 imported `QuorumTestHarness` is permanently hidden by definition of object 
QuorumTestHarness in package server
    [Error] 
/Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/utils/TestUtils.scala:1438:15:
 ambiguous reference to overloaded definition,
    both method doReturn in class Mockito of type (x$1: Any, x$2: 
Object*)org.mockito.stubbing.Stubber
    and  method doReturn in class Mockito of type (x$1: 
Any)org.mockito.stubbing.Stubber
    match argument types (kafka.log.UnifiedLog)
    ```
    
    Reviewers: Luke Chen <[email protected]>
---
 core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala | 4 ++--
 core/src/test/scala/unit/kafka/utils/TestUtils.scala           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala 
b/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala
index b40d20054f3..9f1f5e335e6 100644
--- a/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala
+++ b/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala
@@ -3523,11 +3523,11 @@ class ReplicaManagerTest {
     val tidp0 = new TopicIdPartition(topicId, tp0)
 
     val props = new Properties()
-    props.put(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, 
true)
+    props.put(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, 
true.toString)
     props.put(RemoteLogManagerConfig.REMOTE_STORAGE_MANAGER_CLASS_NAME_PROP, 
classOf[NoOpRemoteStorageManager].getName)
     
props.put(RemoteLogManagerConfig.REMOTE_LOG_METADATA_MANAGER_CLASS_NAME_PROP, 
classOf[NoOpRemoteLogMetadataManager].getName)
     // set log reader threads number to 2
-    props.put(RemoteLogManagerConfig.REMOTE_LOG_READER_THREADS_PROP, 2)
+    props.put(RemoteLogManagerConfig.REMOTE_LOG_READER_THREADS_PROP, 
2.toString)
     val config = new AbstractConfig(RemoteLogManagerConfig.CONFIG_DEF, props)
     val remoteLogManagerConfig = new RemoteLogManagerConfig(config)
     val mockLog = mock(classOf[UnifiedLog])
diff --git a/core/src/test/scala/unit/kafka/utils/TestUtils.scala 
b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
index 0e34bac157d..e587c8cb6e8 100755
--- a/core/src/test/scala/unit/kafka/utils/TestUtils.scala
+++ b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
@@ -1435,7 +1435,7 @@ object TestUtils extends Logging {
 
     if (log.isDefined) {
       val spyLogManager = Mockito.spy(logManager)
-      Mockito.doReturn(log.get).when(spyLogManager).getOrCreateLog(any(), 
anyBoolean(), anyBoolean(), any)
+      Mockito.doReturn(log.get, Nil: 
_*).when(spyLogManager).getOrCreateLog(any(classOf[TopicPartition]), 
anyBoolean(), anyBoolean(), any(classOf[Option[Uuid]]))
       spyLogManager
     } else
       logManager

Reply via email to