Skip to content

Commit

Permalink
Remove deprecated do-while
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Sep 30, 2024
1 parent aebae1d commit 6a4ae5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions e2e-grpc/src/test/scala/ProtoInputStreamSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ class ProtoInputStreamSpec extends AnyFunSpec with Matchers {
var count = 0
var buf = newBuffer
val res = Array.newBuilder[Byte]
do {
while({
res ++= buf.slice(offset, offset + count)
buf = newBuffer
offset += count
count = stream.read(buf, offset, Random.nextInt(3))
} while (count !== -1)
count !== -1
}) {}

res.result() must be(message.toByteArray)
}
Expand Down

0 comments on commit 6a4ae5a

Please sign in to comment.