From 6a4ae5ab1a70520a128e44622e458c5e94b2932d Mon Sep 17 00:00:00 2001 From: Nadav Samet Date: Sun, 29 Sep 2024 18:39:23 -0700 Subject: [PATCH] Remove deprecated do-while --- e2e-grpc/src/test/scala/ProtoInputStreamSpec.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e-grpc/src/test/scala/ProtoInputStreamSpec.scala b/e2e-grpc/src/test/scala/ProtoInputStreamSpec.scala index 56c2d4ff0..460373fb1 100644 --- a/e2e-grpc/src/test/scala/ProtoInputStreamSpec.scala +++ b/e2e-grpc/src/test/scala/ProtoInputStreamSpec.scala @@ -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) }