DL1231 commented on code in PR #19846: URL: https://github.com/apache/kafka/pull/19846#discussion_r2113951640
########## core/src/test/scala/integration/kafka/server/DelayedRemoteFetchTest.scala: ########## @@ -233,16 +234,16 @@ class DelayedRemoteFetchTest { private def buildReadResult(error: Errors, highWatermark: Int = 0, leaderLogStartOffset: Int = 0): LogReadResult = { - LogReadResult( - exception = if (error != Errors.NONE) Some(error.exception) else None, - info = new FetchDataInfo(LogOffsetMetadata.UNKNOWN_OFFSET_METADATA, MemoryRecords.EMPTY), - divergingEpoch = None, - highWatermark = highWatermark, - leaderLogStartOffset = leaderLogStartOffset, - leaderLogEndOffset = -1L, - followerLogStartOffset = -1L, - fetchTimeMs = -1L, - lastStableOffset = None) + new LogReadResult( + new FetchDataInfo(LogOffsetMetadata.UNKNOWN_OFFSET_METADATA, MemoryRecords.EMPTY), + Optional.empty(), + highWatermark, + leaderLogStartOffset, + -1L, + -1L, + -1L, + OptionalLong.empty(), + if (error != Errors.NONE) Optional.of(error.exception).asInstanceOf[Optional[Throwable]] else Optional.empty[Throwable]()) Review Comment: Good catch! -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org