Copilot commented on code in PR #3683:
URL: https://github.com/apache/celeborn/pull/3683#discussion_r3225208390
##########
worker/src/test/scala/org/apache/celeborn/service/deploy/worker/storage/FlushTaskSuite.scala:
##########
@@ -84,6 +85,64 @@ class FlushTaskSuite extends CelebornFunSuite {
})
}
+ test("HdfsFlushTask flush should work with buffers of various sizes") {
+ val bytes = "another test data".getBytes("UTF-8")
+ val len = bytes.length
+
+ // Define the scenarios: (scenario name, size to allocate)
+ val scenarios = Table(
+ ("description", "allocatedSize"),
+ ("provider buffer is the same size as the buffer", len),
+ ("provider buffer is bigger", len + 10),
+ ("provider buffer smaller", len - 5))
+
Review Comment:
This test duplicates the same `bytes`/`len`/`scenarios` setup that already
exists in `runTest` below. Consider extracting the scenarios (and maybe the
common buffer setup) into a shared helper/val to avoid the two tests drifting
over time when scenarios are updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]