From cc4989d18d13a85881fe7ef29b2d7ccfffdfa9e3 Mon Sep 17 00:00:00 2001 From: "scala-steward-asf[bot]" <147768647+scala-steward-asf[bot]@users.noreply.github.com> Date: Sun, 26 Jan 2025 00:09:07 +0000 Subject: [PATCH] Reformat with scalafmt 3.8.6 Executed command: scalafmt --non-interactive --- .../kafka/benchmarks/PerfFixtureHelpers.scala | 2 +- .../ReactiveKafkaConsumerBenchmarks.scala | 2 +- .../ReactiveKafkaProducerBenchmarks.scala | 2 +- .../ReactiveKafkaTransactionBenchmarks.scala | 2 +- build.sbt | 3 +-- .../kafka/scaladsl/MetadataClientSpec.scala | 16 ++++++++-------- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala index 5a96782f..7653ddda 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala @@ -46,7 +46,7 @@ object PerfFixtureHelpers { private[benchmarks] trait PerfFixtureHelpers extends LazyLogging { import PerfFixtureHelpers._ - val producerTimeout = 6 minutes + val producerTimeout = 6.minutes val logPercentStep = 25 val adminClientCloseTimeout = Duration.ofSeconds(5) val producerCloseTimeout = adminClientCloseTimeout diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala index be66980a..a912cbf5 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala @@ -36,7 +36,7 @@ import scala.language.postfixOps import scala.util.Success object ReactiveKafkaConsumerBenchmarks extends LazyLogging with InflightMetrics { - val streamingTimeout: FiniteDuration = 30 minutes + val streamingTimeout: FiniteDuration = 30.minutes type NonCommittableFixture = ReactiveKafkaConsumerTestFixture[ConsumerRecord[Array[Byte], String]] type CommittableFixture = ReactiveKafkaConsumerTestFixture[CommittableMessage[Array[Byte], String]] diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala index b622e62d..6fb3b0a1 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala @@ -30,7 +30,7 @@ import scala.concurrent.duration._ import scala.language.postfixOps object ReactiveKafkaProducerBenchmarks extends LazyLogging { - val streamingTimeout = 30 minutes + val streamingTimeout = 30.minutes val logStep = 100000 type Fixture = ReactiveKafkaConsumerTestFixture[CommittableMessage[Array[Byte], String]] diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala index 55ec86f2..778e80e7 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala @@ -30,7 +30,7 @@ import scala.language.postfixOps import scala.util.Success object ReactiveKafkaTransactionBenchmarks extends LazyLogging { - val streamingTimeout: FiniteDuration = 30 minutes + val streamingTimeout: FiniteDuration = 30.minutes type TransactionFixture = ReactiveKafkaTransactionTestFixture[KTransactionMessage, KProducerMessage, KResult] /** diff --git a/build.sbt b/build.sbt index 7d35492f..cbf5bb3d 100644 --- a/build.sbt +++ b/build.sbt @@ -135,8 +135,7 @@ lazy val docs = project Preprocess / siteSubdirName := s"api/pekko-connectors-kafka/${projectInfoVersion.value}", Preprocess / sourceDirectory := (LocalRootProject / ScalaUnidoc / unidoc / target).value, Preprocess / preprocessRules := Seq( - ("\\.java\\.scala".r, _ => ".java"), - ("https://javadoc\\.io/page/".r, _ => "https://javadoc\\.io/static/"), + ("\\.java\\.scala".r, _ => ".java"), ("https://javadoc\\.io/page/".r, _ => "https://javadoc\\.io/static/"), // bug in Scaladoc ("https://docs\\.oracle\\.com/en/java/javase/11/docs/api/java.base/java/time/Duration\\$.html".r, _ => "https://docs\\.oracle\\.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html"), diff --git a/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala b/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala index e9f4f082..7bcb9722 100644 --- a/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala +++ b/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala @@ -31,7 +31,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -49,7 +49,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val nonExistingPartition = new TopicPartition("non-existing topic", 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) val beginningOffsetsFuture = metadataClient .getBeginningOffsets(Set(nonExistingPartition)) @@ -65,7 +65,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -83,7 +83,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group1 = createGroupId(1) val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -98,7 +98,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group1 = createGroupId(1) val nonExistingPartition = new TopicPartition("non-existing topic", 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) val endOffsetsFuture = metadataClient.getEndOffsets(Set(nonExistingPartition)) @@ -112,7 +112,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group1 = createGroupId(1) val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -128,7 +128,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val topic1 = createTopic(suffix = 1, partitions = 2) val topic2 = createTopic(suffix = 2, partitions = 1) val consumerSettings = consumerDefaults.withGroupId(group) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10, partition = 0)) awaitProduce(produce(topic1, 1 to 10, partition = 1)) @@ -148,7 +148,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group = createGroupId(1) val topic = createTopic(suffix = 1, partitions = 2) val consumerSettings = consumerDefaults.withGroupId(group) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic, 1 to 10, partition = 0)) awaitProduce(produce(topic, 1 to 10, partition = 1))