Skip to content

Commit 33f8176

Browse files
committed
deprecated Source.actorRef function removed
readability import temp compile workaround Update ConnectionTestApp.scala Update ConnectionTestApp.scala
1 parent eb3152e commit 33f8176

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/ConnectionTestApp.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ object ConnectionTestApp {
4242

4343
val clientFlow = Http().superPool[Int]()
4444

45-
val sourceActor = {
45+
val sourceQueue = {
4646
// Our superPool expects (HttpRequest, Int) as input
4747
val source =
48-
Source.actorRef[(HttpRequest, Int)](10000, OverflowStrategy.dropNew).buffer(20000, OverflowStrategy.fail)
48+
Source.queue[(HttpRequest, Int)](10000)
49+
.buffer(20000, OverflowStrategy.fail)
4950
val sink = Sink.foreach[(Try[HttpResponse], Int)] {
5051
case (resp, id) => handleResponse(resp, id)
5152
}
@@ -54,7 +55,7 @@ object ConnectionTestApp {
5455
}
5556

5657
def sendPoolFlow(uri: Uri, id: Int): Unit = {
57-
sourceActor ! ((buildRequest(uri), id))
58+
sourceQueue.offer((buildRequest(uri), id))
5859
}
5960

6061
def sendPoolFuture(uri: Uri, id: Int): Unit = {

0 commit comments

Comments
 (0)