Skip to content

Commit

Permalink
Remove deprecate do-while
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Sep 30, 2024
1 parent d28279f commit 3fc167a
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 3fc167a

Please sign in to comment.