divijvaidya commented on code in PR #13850:
URL: https://github.com/apache/kafka/pull/13850#discussion_r1231931509


##########
core/src/main/scala/kafka/log/remote/RemoteIndexCache.scala:
##########
@@ -167,14 +210,14 @@ class RemoteIndexCache(maxSize: Int = 1024, 
remoteStorageManager: RemoteStorageM
   init()
 
   // Start cleaner thread that will clean the expired entries
-  val cleanerThread: ShutdownableThread = new 
ShutdownableThread("remote-log-index-cleaner") {
+  private[remote] var cleanerThread: ShutdownableThread = new 
ShutdownableThread("remote-log-index-cleaner") {

Review Comment:
   We need it as var for unit tests where we want to override this with a spy 
implementation so that we can verify the invocations. I can alternatively add a 
setter for this thread which could be used in unit tests but preferred using 
var to be simpler.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to