jerqi commented on code in PR #74:
URL: https://github.com/apache/incubator-uniffle/pull/74#discussion_r932462578
##########
common/src/test/java/org/apache/uniffle/common/RssShuffleUtilsTest.java:
##########
@@ -46,4 +48,27 @@ public void testCompression(int size) {
assertArrayEquals(data, buffer2);
}
+ @Test
+ public void testDestroyDirectByteBuffer() throws Exception{
+ int size = 10;
+ byte b = 1;
+ System.out.println(b);
+ ByteBuffer byteBuffer = ByteBuffer.allocateDirect(size);
+ for (int i = 0; i < size; i++) {
+ byteBuffer.put(b);
+ }
+ byteBuffer.flip();
+ RssShuffleUtils.destroyDirectByteBuffer(byteBuffer);
+ Thread.sleep(200); //Memory release maybe not fast enough
Review Comment:
```
// The memory may not be freed fast enough.
Thread.sleep(200);
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]