You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by jr...@apache.org on 2023/06/20 11:03:22 UTC

[incubator-pekko-http] branch main updated: core: remove use of PrettyByteString (#191)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new f07581b4f core: remove use of PrettyByteString (#191)
f07581b4f is described below

commit f07581b4f7b115eb46c51e401ea3432cdd46011b
Author: Johannes Rudolph <jo...@gmail.com>
AuthorDate: Tue Jun 20 13:03:18 2023 +0200

    core: remove use of PrettyByteString (#191)
---
 .../pekko/http/impl/engine/ws/ByteStringSinkProbe.scala       | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/ByteStringSinkProbe.scala b/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/ByteStringSinkProbe.scala
index b0137e3ea..49df3ace7 100644
--- a/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/ByteStringSinkProbe.scala
+++ b/http-core/src/test/scala/org/apache/pekko/http/impl/engine/ws/ByteStringSinkProbe.scala
@@ -17,9 +17,10 @@ import org.apache.pekko
 import pekko.NotUsed
 import pekko.actor.{ ActorSystem, ClassicActorSystemProvider }
 import pekko.annotation.InternalApi
+import pekko.http.impl.util.LogByteStringTools
 import pekko.stream.scaladsl.{ Sink, Source }
 import pekko.stream.testkit.TestSubscriber
-import pekko.util.{ ByteString, PrettyByteString }
+import pekko.util.ByteString
 
 import scala.annotation.tailrec
 import scala.concurrent.duration.FiniteDuration
@@ -82,8 +83,8 @@ private[http] object ByteStringSinkProbe {
           catch {
             case ex if ex.getMessage.contains("Expected OnNext") =>
               throw new AssertionError(
-                s"Expected [$length] bytes but only got [${inBuffer.size}] bytes\n${PrettyByteString.asPretty(
-                    inBuffer).prettyPrint(1024)}")
+                s"Expected [$length] bytes but only got [${inBuffer.size}] bytes\n${LogByteStringTools.printByteString(
+                    inBuffer, 1024)}")
           }
           expectBytes(length)
         }
@@ -92,10 +93,10 @@ private[http] object ByteStringSinkProbe {
         val got = expectBytes(expected.length)
         val details =
           "Expected: \n" +
-          PrettyByteString.asPretty(expected).prettyPrint(1024) +
+          LogByteStringTools.printByteString(expected, 1024) +
           "\n" +
           "But got: \n" +
-          PrettyByteString.asPretty(got).prettyPrint(1024)
+          LogByteStringTools.printByteString(got, 1024)
 
         assert(got == expected, s"expected ${expected.length} bytes, but got ${got.length} bytes \n$details")
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org