Skip to content

Commit

Permalink
Rename variables to fix 2.13.13 compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Apr 3, 2024
1 parent a79d1b7 commit 2a37c74
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ trait BackupClientInterfaceTest
if (allBoundariesWithoutMiddles.length > 1) {
@nowarn("msg=not.*?exhaustive")
val withBeforeAndAfter =
allBoundariesWithoutMiddles.sliding(2).map { case Seq(before, after) => (before, after) }.toList
allBoundariesWithoutMiddles.sliding(2).map { case Seq(first, second) => (first, second) }.toList

val initialTime = kafkaDataWithTimePeriod.data.head.timestamp

Inspectors.forEvery(withBeforeAndAfter) { case (before, after) =>
Inspectors.forEvery(withBeforeAndAfter) { case (first, second) =>
val periodAsMillis = kafkaDataWithTimePeriod.periodSlice.toMillis
((before.reducedConsumerRecord.timestamp - initialTime) / periodAsMillis) mustNot equal(
(after.reducedConsumerRecord.timestamp - initialTime) / periodAsMillis
((first.reducedConsumerRecord.timestamp - initialTime) / periodAsMillis) mustNot equal(
(second.reducedConsumerRecord.timestamp - initialTime) / periodAsMillis
)
}
}
Expand All @@ -113,14 +113,14 @@ trait BackupClientInterfaceTest

val allCoupledMiddles = result
.sliding(2)
.collect { case Seq(before: mock.Element, after: mock.Element) =>
(before, after)
.collect { case Seq(first: mock.Element, second: mock.Element) =>
(first, second)
}
.toList

Inspectors.forEvery(allCoupledMiddles) { case (before, after) =>
ChronoUnit.MICROS.between(before.reducedConsumerRecord.toOffsetDateTime,
after.reducedConsumerRecord.toOffsetDateTime
Inspectors.forEvery(allCoupledMiddles) { case (first, second) =>
ChronoUnit.MICROS.between(first.reducedConsumerRecord.toOffsetDateTime,
second.reducedConsumerRecord.toOffsetDateTime
) must be < kafkaDataWithTimePeriod.periodSlice.toMicros
}
}
Expand Down

0 comments on commit 2a37c74

Please sign in to comment.