Skip to content

Commit b63e560

Browse files
committed
TestSource/TestSink probe removed in Pekko 2
1 parent 671d0c7 commit b63e560

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

http-core/src/test/scala/org/apache/pekko/http/impl/engine/client/HttpsProxyGraphStageSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ class HttpsProxyGraphStageSpec extends PekkoSpecWithMaterializer {
208208

209209
val flowUnderTest = proxyGraphStage.join(proxyFlow)
210210

211-
val (source, sink) = TestSource.probe[ByteString]
211+
val (source, sink) = TestSource[ByteString]()
212212
.via(flowUnderTest)
213-
.toMat(TestSink.probe)(Keep.both)
213+
.toMat(TestSink())(Keep.both)
214214
.run()
215215

216216
fn(source, flowInProbe, flowOutProbe, sink)

http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/WebSocketIntegrationSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class WebSocketIntegrationSpec extends PekkoSpecWithMaterializer(
5959

6060
val (response, sink) = Http().singleWebSocketRequest(
6161
WebSocketRequest("ws://127.0.0.1:" + myPort),
62-
Flow.fromSinkAndSourceMat(TestSink.probe[Message], Source.empty)(Keep.left))
62+
Flow.fromSinkAndSourceMat(TestSink[Message](), Source.empty)(Keep.left))
6363

6464
response.futureValue.response.status.isSuccess should ===(true)
6565
sink
@@ -119,7 +119,7 @@ class WebSocketIntegrationSpec extends PekkoSpecWithMaterializer(
119119
Tcp(system).outgoingConnection(new InetSocketAddress("localhost", myPort), halfClose = true)))(
120120
Keep.both)
121121
}(Keep.right)
122-
.toMat(TestSink.probe[Message])(Keep.both)
122+
.toMat(TestSink[Message]())(Keep.both)
123123
.run()
124124

125125
response.futureValue.response.status.isSuccess should ===(true)

http-core/src/test/scala/org/apache/pekko/http/scaladsl/GracefulTerminationSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class GracefulTerminationSpec
101101
// start reading the response
102102
val responseEntity = r1.futureValue.entity.dataBytes
103103
.via(Framing.delimiter(ByteString(","), 20))
104-
.runWith(TestSink.probe[ByteString])(SystemMaterializer(clientSystem).materializer)
104+
.runWith(TestSink[ByteString]())(SystemMaterializer(clientSystem).materializer)
105105
responseEntity.requestNext().utf8String should ===("reply1")
106106

107107
val termination = serverBinding.terminate(hardDeadline = 1.second)
@@ -132,7 +132,7 @@ class GracefulTerminationSpec
132132
// start reading the response
133133
val response = r1.futureValue.entity.dataBytes
134134
.via(Framing.delimiter(ByteString(","), 20))
135-
.runWith(TestSink.probe[ByteString])
135+
.runWith(TestSink[ByteString]())
136136
response.requestNext().utf8String should ===("reply1")
137137

138138
try {

http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ class Http2ClientSpec extends PekkoSpecWithMaterializer("""
426426
val chunksIn =
427427
user.expectResponse()
428428
.entity.asInstanceOf[Chunked]
429-
.chunks.runWith(TestSink.probe[ChunkStreamPart](system.classicSystem))
429+
.chunks.runWith(TestSink[ChunkStreamPart]()(system.classicSystem))
430430
val data1 = ByteString("abcdef")
431431
network.sendDATA(TheStreamId, endStream = false, data1)
432432
chunksIn.request(2)

http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ServerDemuxSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ class Http2ServerDemuxSpec extends PekkoSpecWithMaterializer("""
4040
(SettingIdentifier.SETTINGS_ENABLE_PUSH, 0))
4141
val bidi = BidiFlow.fromGraph(new Http2ServerDemux(settings, initialRemoteSettings, upgraded = true))
4242

43-
val ((substreamProducer, (frameConsumer, frameProducer)), substreamConsumer) = TestSource.probe[Http2SubStream]
44-
.viaMat(bidi.joinMat(Flow.fromSinkAndSourceMat(TestSink.probe[FrameEvent], TestSource.probe[FrameEvent])(
43+
val ((substreamProducer, (frameConsumer, frameProducer)), substreamConsumer) = TestSource[Http2SubStream]()
44+
.viaMat(bidi.joinMat(Flow.fromSinkAndSourceMat(TestSink[FrameEvent](), TestSource[FrameEvent]())(
4545
Keep.both))(Keep.right))(Keep.both)
46-
.toMat(TestSink.probe[Http2SubStream])(Keep.both)
46+
.toMat(TestSink[Http2SubStream]())(Keep.both)
4747
.run()
4848

4949
frameConsumer.request(1000)

0 commit comments

Comments
 (0)