You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by gi...@apache.org on 2025/01/19 00:09:44 UTC
(pekko-connectors-kafka) 02/03: Reformat with scalafmt 3.8.5
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch update/scalafmt-core-3.8.5
in repository https://gitbox.apache.org/repos/asf/pekko-connectors-kafka.git
commit 1561c4c81d5e6f12c6025b46fd7d9faca352693a
Author: scala-steward-asf[bot] <14...@users.noreply.github.com>
AuthorDate: Sun Jan 19 00:09:34 2025 +0000
Reformat with scalafmt 3.8.5
Executed command: scalafmt --non-interactive
---
.../pekko/kafka/benchmarks/PerfFixtureHelpers.scala | 2 +-
.../benchmarks/ReactiveKafkaConsumerBenchmarks.scala | 2 +-
.../benchmarks/ReactiveKafkaProducerBenchmarks.scala | 2 +-
.../benchmarks/ReactiveKafkaTransactionBenchmarks.scala | 2 +-
build.sbt | 3 +--
.../apache/pekko/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))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org