This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a3cf9a8c TestSource/TestSink probe removed in Pekko 2 (#870)
3a3cf9a8c is described below

commit 3a3cf9a8c87aa41290fa612b282dc58e260a1e21
Author: PJ Fanning <[email protected]>
AuthorDate: Fri Nov 14 19:13:09 2025 +0100

    TestSource/TestSink probe removed in Pekko 2 (#870)
---
 .../pekko/http/impl/engine/client/HttpsProxyGraphStageSpec.scala    | 4 ++--
 .../apache/pekko/http/impl/engine/ws/WebSocketIntegrationSpec.scala | 4 ++--
 .../org/apache/pekko/http/scaladsl/GracefulTerminationSpec.scala    | 4 ++--
 .../org/apache/pekko/http/impl/engine/http2/Http2ClientSpec.scala   | 2 +-
 .../apache/pekko/http/impl/engine/http2/Http2ServerDemuxSpec.scala  | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/http-core/src/test/scala/org/apache/pekko/http/impl/engine/client/HttpsProxyGraphStageSpec.scala
 
b/http-core/src/test/scala/org/apache/pekko/http/impl/engine/client/HttpsProxyGraphStageSpec.scala
index 7948a0ded..368eb6d6c 100644
--- 
a/http-core/src/test/scala/org/apache/pekko/http/impl/engine/client/HttpsProxyGraphStageSpec.scala
+++ 
b/http-core/src/test/scala/org/apache/pekko/http/impl/engine/client/HttpsProxyGraphStageSpec.scala
@@ -208,9 +208,9 @@ class HttpsProxyGraphStageSpec extends 
PekkoSpecWithMaterializer {
 
         val flowUnderTest = proxyGraphStage.join(proxyFlow)
 
-        val (source, sink) = TestSource.probe[ByteString]
+        val (source, sink) = TestSource[ByteString]()
           .via(flowUnderTest)
-          .toMat(TestSink.probe)(Keep.both)
+          .toMat(TestSink())(Keep.both)
           .run()
 
         fn(source, flowInProbe, flowOutProbe, sink)
diff --git 
a/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/WebSocketIntegrationSpec.scala
 
b/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/WebSocketIntegrationSpec.scala
index 952a7d5f9..211934cbf 100644
--- 
a/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/WebSocketIntegrationSpec.scala
+++ 
b/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/WebSocketIntegrationSpec.scala
@@ -59,7 +59,7 @@ class WebSocketIntegrationSpec extends 
PekkoSpecWithMaterializer(
 
       val (response, sink) = Http().singleWebSocketRequest(
         WebSocketRequest("ws://127.0.0.1:" + myPort),
-        Flow.fromSinkAndSourceMat(TestSink.probe[Message], 
Source.empty)(Keep.left))
+        Flow.fromSinkAndSourceMat(TestSink[Message](), 
Source.empty)(Keep.left))
 
       response.futureValue.response.status.isSuccess should ===(true)
       sink
@@ -119,7 +119,7 @@ class WebSocketIntegrationSpec extends 
PekkoSpecWithMaterializer(
                 Tcp(system).outgoingConnection(new 
InetSocketAddress("localhost", myPort), halfClose = true)))(
                 Keep.both)
           }(Keep.right)
-          .toMat(TestSink.probe[Message])(Keep.both)
+          .toMat(TestSink[Message]())(Keep.both)
           .run()
 
       response.futureValue.response.status.isSuccess should ===(true)
diff --git 
a/http-core/src/test/scala/org/apache/pekko/http/scaladsl/GracefulTerminationSpec.scala
 
b/http-core/src/test/scala/org/apache/pekko/http/scaladsl/GracefulTerminationSpec.scala
index c120794dd..9fdb47d3c 100644
--- 
a/http-core/src/test/scala/org/apache/pekko/http/scaladsl/GracefulTerminationSpec.scala
+++ 
b/http-core/src/test/scala/org/apache/pekko/http/scaladsl/GracefulTerminationSpec.scala
@@ -101,7 +101,7 @@ class GracefulTerminationSpec
             // start reading the response
             val responseEntity = r1.futureValue.entity.dataBytes
               .via(Framing.delimiter(ByteString(","), 20))
-              
.runWith(TestSink.probe[ByteString])(SystemMaterializer(clientSystem).materializer)
+              
.runWith(TestSink[ByteString]())(SystemMaterializer(clientSystem).materializer)
             responseEntity.requestNext().utf8String should ===("reply1")
 
             val termination = serverBinding.terminate(hardDeadline = 1.second)
@@ -132,7 +132,7 @@ class GracefulTerminationSpec
       // start reading the response
       val response = r1.futureValue.entity.dataBytes
         .via(Framing.delimiter(ByteString(","), 20))
-        .runWith(TestSink.probe[ByteString])
+        .runWith(TestSink[ByteString]())
       response.requestNext().utf8String should ===("reply1")
 
       try {
diff --git 
a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientSpec.scala
 
b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientSpec.scala
index d6f2954ef..d17c0185f 100644
--- 
a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientSpec.scala
+++ 
b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientSpec.scala
@@ -426,7 +426,7 @@ class Http2ClientSpec extends PekkoSpecWithMaterializer("""
         val chunksIn =
           user.expectResponse()
             .entity.asInstanceOf[Chunked]
-            
.chunks.runWith(TestSink.probe[ChunkStreamPart](system.classicSystem))
+            .chunks.runWith(TestSink[ChunkStreamPart]()(system.classicSystem))
         val data1 = ByteString("abcdef")
         network.sendDATA(TheStreamId, endStream = false, data1)
         chunksIn.request(2)
diff --git 
a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ServerDemuxSpec.scala
 
b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ServerDemuxSpec.scala
index 7685bad77..8be03fa12 100644
--- 
a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ServerDemuxSpec.scala
+++ 
b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ServerDemuxSpec.scala
@@ -40,10 +40,10 @@ class Http2ServerDemuxSpec extends 
PekkoSpecWithMaterializer("""
         (SettingIdentifier.SETTINGS_ENABLE_PUSH, 0))
       val bidi = BidiFlow.fromGraph(new Http2ServerDemux(settings, 
initialRemoteSettings, upgraded = true))
 
-      val ((substreamProducer, (frameConsumer, frameProducer)), 
substreamConsumer) = TestSource.probe[Http2SubStream]
-        
.viaMat(bidi.joinMat(Flow.fromSinkAndSourceMat(TestSink.probe[FrameEvent], 
TestSource.probe[FrameEvent])(
+      val ((substreamProducer, (frameConsumer, frameProducer)), 
substreamConsumer) = TestSource[Http2SubStream]()
+        .viaMat(bidi.joinMat(Flow.fromSinkAndSourceMat(TestSink[FrameEvent](), 
TestSource[FrameEvent]())(
           Keep.both))(Keep.right))(Keep.both)
-        .toMat(TestSink.probe[Http2SubStream])(Keep.both)
+        .toMat(TestSink[Http2SubStream]())(Keep.both)
         .run()
 
       frameConsumer.request(1000)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to