junrao commented on code in PR #12136:
URL: https://github.com/apache/kafka/pull/12136#discussion_r880990528
##########
core/src/test/scala/unit/kafka/log/LogLoaderTest.scala:
##########
@@ -158,22 +192,37 @@ class LogLoaderTest {
}
locally {
+ val (logManager, runLoadLogs) =
initializeLogManagerForSimulatingErrorTest(logDirFailureChannel)
simulateError.hasError = true
- val logManager: LogManager = interceptedLogManager(logConfig, logDirs,
simulateError)
- log = logManager.getOrCreateLog(topicPartition, isNew = true, topicId =
None)
+ simulateError.errorType = ErrorTypes.RuntimeException
- // Simulate error
- assertThrows(classOf[RuntimeException], () => {
- val defaultConfig = logManager.currentDefaultConfig
- logManager.loadLogs(defaultConfig,
logManager.fetchTopicConfigOverrides(defaultConfig, Set.empty))
- })
+ // Simulate Runtime error
Review Comment:
Should this comment be moved to before line 196?
--
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]