Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Akka 2.7.0-M3 #1546

Merged
merged 2 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val Scala213 = "2.13.8"
val Scala212 = "2.12.16"

val AkkaBinaryVersionForDocs = "2.7"
val akkaVersion = "2.7.0-M1"
val akkaVersion = "2.7.0-M3"

// Keep .scala-steward.conf pin in sync
val kafkaVersion = "3.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ abstract class KafkaSpec(_kafkaPort: Int, val zooKeeperPort: Int, actorSystem: A
Consumer
.plainSource(consumerSettings, Subscriptions.topics(topic.toSet))
.map(_.value)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/akka/kafka/TransactionsOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ trait TransactionsOps extends TestSuite with Matchers {
)(implicit actorSystem: ActorSystem, mat: Materializer): TestSubscriber.Probe[String] =
offsetValueSource(settings, topic)
.map(_._2)
.runWith(TestSink.probe)
.runWith(TestSink())

def offsetValueSource(settings: ConsumerSettings[String, String],
topic: String): Source[(Long, String), Consumer.Control] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,10 @@ class CommitCollectorStageSpec(_system: ActorSystem)

val flow = Committer.batchFlow(committerSettings)

val ((source, control), sink) = TestSource
.probe[Committable]
val ((source, control), sink) = TestSource[Committable]()
.viaMat(ConsumerControlFactory.controlFlow())(Keep.both)
.via(flow)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

(source, control, sink)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val mock = new ConsumerMock[K, V](commitLog)

val (control, probe) = createSourceWithMetadata(mock.mock, (rec: ConsumerRecord[K, V]) => rec.offset.toString)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msg = createMessage(1)
Expand Down Expand Up @@ -143,7 +143,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msg = createMessage(1)
Expand Down Expand Up @@ -173,7 +173,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler(onCompleteFailure)
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msg = createMessage(1)
Expand Down Expand Up @@ -208,7 +208,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler(onCompleteFailure)
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msg = createMessage(1)
Expand Down Expand Up @@ -238,7 +238,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val count = 100
Expand Down Expand Up @@ -268,7 +268,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock, topics = Set("topic1", "topic2"))
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1"))
Expand Down Expand Up @@ -305,7 +305,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val (control, probe) = createSourceWithMetadata(mock.mock,
(rec: ConsumerRecord[K, V]) => rec.offset.toString,
topics = Set("topic1", "topic2"))
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1"))
Expand Down Expand Up @@ -344,7 +344,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val (control, probe) = createSourceWithMetadata(mock.mock,
(rec: ConsumerRecord[K, V]) => rec.offset.toString,
topics = Set("topic1", "topic2"))
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1"))
Expand Down Expand Up @@ -386,10 +386,10 @@ class CommittingWithMockSpec(_system: ActorSystem)
val mock1 = new ConsumerMock[K, V](commitLog1)
val mock2 = new ConsumerMock[K, V](commitLog2)
val (control1, probe1) = createCommittableSource(mock1.mock, "group1", Set("topic1", "topic2"))
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()
val (control2, probe2) = createCommittableSource(mock2.mock, "group2", Set("topic1", "topic3"))
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgs1a = (1 to 3).map(createMessage(_, "topic1", "group1"))
Expand Down Expand Up @@ -446,7 +446,7 @@ class CommittingWithMockSpec(_system: ActorSystem)
val (control, probe) = createSourceWithMetadata(mock.mock,
(rec: ConsumerRecord[K, V]) => rec.offset.toString,
topics = Set("topic1", "topic2"))
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1"))
Expand Down
22 changes: 11 additions & 11 deletions tests/src/test/scala/akka/kafka/internal/ConsumerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ConsumerSpec(_system: ActorSystem)
def checkMessagesReceiving(msgss: Seq[Seq[CommittableMessage[K, V]]]): Unit = {
val mock = new ConsumerMock[K, V]()
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

probe.request(msgss.map(_.size).sum.toLong)
Expand Down Expand Up @@ -118,7 +118,7 @@ class ConsumerSpec(_system: ActorSystem)
val mock = new FailingConsumerMock[K, V](new Exception("Fatal Kafka error"), failOnCallNumber = 1)

val probe = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.right)
.toMat(TestSink())(Keep.right)
.run()

probe
Expand All @@ -129,7 +129,7 @@ class ConsumerSpec(_system: ActorSystem)
it should "complete stage when stream control.stop called" in assertAllStagesStopped {
val mock = new ConsumerMock[K, V]()
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

probe.request(100)
Expand All @@ -142,7 +142,7 @@ class ConsumerSpec(_system: ActorSystem)
it should "complete stage when processing flow canceled" in assertAllStagesStopped {
val mock = new ConsumerMock[K, V]()
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

probe.request(100)
Expand Down Expand Up @@ -178,7 +178,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

mock.enqueue((1 to 10).map(createMessage).map(toRecord))
Expand All @@ -198,7 +198,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

probe.request(1)
Expand All @@ -213,7 +213,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

probe.cancel()
Expand All @@ -225,7 +225,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

mock.enqueue((1 to 10).map(createMessage).map(toRecord))
Expand All @@ -243,7 +243,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgs = (1 to 10).map(createMessage)
Expand Down Expand Up @@ -279,7 +279,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msg = createMessage(1)
Expand All @@ -302,7 +302,7 @@ class ConsumerSpec(_system: ActorSystem)
val commitLog = new ConsumerMock.LogHandler()
val mock = new ConsumerMock[K, V](commitLog)
val (control, probe) = createCommittableSource(mock.mock)
.toMat(TestSink.probe)(Keep.both)
.toMat(TestSink())(Keep.both)
.run()

val msgs = (1 to 10).map(createMessage)
Expand Down
Loading