You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/09 14:32:19 UTC

[GitHub] [kafka] ijuma opened a new pull request, #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

ijuma opened a new pull request, #12276:
URL: https://github.com/apache/kafka/pull/12276

   The workaround is not required with mockito.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] ijuma commented on a diff in pull request #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

Posted by GitBox <gi...@apache.org>.
ijuma commented on code in PR #12276:
URL: https://github.com/apache/kafka/pull/12276#discussion_r893705374


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -1953,6 +1935,7 @@ class ReplicaManagerTest {
     val mockLogMgr: LogManager = mock(classOf[LogManager])
     when(mockLogMgr.liveLogDirs).thenReturn(config.logDirs.map(new File(_).getAbsoluteFile))
     when(mockLogMgr.getOrCreateLog(ArgumentMatchers.eq(topicPartitionObj), ArgumentMatchers.eq(false), ArgumentMatchers.eq(false), any())).thenReturn(mockLog)
+//    when(mockLogMgr.getLog(topicPartitionObj, isFuture = false)).thenReturn(Some(mockMergedLog))

Review Comment:
   No :) The test doesn't pass without this line. Fixed.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12276:
URL: https://github.com/apache/kafka/pull/12276#issuecomment-1152133193

   The failing test `testSnapshotOnlyAfterConfiguredMinBytes` is failing due to a bug which creates a snapshot with LONG_MAX epoch. This is documented in https://issues.apache.org/jira/browse/KAFKA-13943. The bug has been fixed in https://github.com/apache/kafka/pull/12224. @ijuma perhaps you may be interested to review that one after this? It will help us reduce flaky test behaviour.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] Kvicii commented on a diff in pull request #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

Posted by GitBox <gi...@apache.org>.
Kvicii commented on code in PR #12276:
URL: https://github.com/apache/kafka/pull/12276#discussion_r893663717


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -1953,6 +1935,7 @@ class ReplicaManagerTest {
     val mockLogMgr: LogManager = mock(classOf[LogManager])
     when(mockLogMgr.liveLogDirs).thenReturn(config.logDirs.map(new File(_).getAbsoluteFile))
     when(mockLogMgr.getOrCreateLog(ArgumentMatchers.eq(topicPartitionObj), ArgumentMatchers.eq(false), ArgumentMatchers.eq(false), any())).thenReturn(mockLog)
+//    when(mockLogMgr.getLog(topicPartitionObj, isFuture = false)).thenReturn(Some(mockMergedLog))

Review Comment:
   I think if this unused, we should remove it ?



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on a diff in pull request #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on code in PR #12276:
URL: https://github.com/apache/kafka/pull/12276#discussion_r893639562


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -1953,6 +1935,7 @@ class ReplicaManagerTest {
     val mockLogMgr: LogManager = mock(classOf[LogManager])
     when(mockLogMgr.liveLogDirs).thenReturn(config.logDirs.map(new File(_).getAbsoluteFile))
     when(mockLogMgr.getOrCreateLog(ArgumentMatchers.eq(topicPartitionObj), ArgumentMatchers.eq(false), ArgumentMatchers.eq(false), any())).thenReturn(mockLog)
+//    when(mockLogMgr.getLog(topicPartitionObj, isFuture = false)).thenReturn(Some(mockMergedLog))

Review Comment:
   is this intended?



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] jsancio merged pull request #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

Posted by GitBox <gi...@apache.org>.
jsancio merged PR #12276:
URL: https://github.com/apache/kafka/pull/12276


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] ijuma commented on a diff in pull request #12276: MINOR: Remove ReplicaManagerTest.initializeLogAndTopicId

Posted by GitBox <gi...@apache.org>.
ijuma commented on code in PR #12276:
URL: https://github.com/apache/kafka/pull/12276#discussion_r893705374


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -1953,6 +1935,7 @@ class ReplicaManagerTest {
     val mockLogMgr: LogManager = mock(classOf[LogManager])
     when(mockLogMgr.liveLogDirs).thenReturn(config.logDirs.map(new File(_).getAbsoluteFile))
     when(mockLogMgr.getOrCreateLog(ArgumentMatchers.eq(topicPartitionObj), ArgumentMatchers.eq(false), ArgumentMatchers.eq(false), any())).thenReturn(mockLog)
+//    when(mockLogMgr.getLog(topicPartitionObj, isFuture = false)).thenReturn(Some(mockMergedLog))

Review Comment:
   No :) The test doesn't pass unless this is commented out. Fixed.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org