dungba88 commented on code in PR #12778:
URL: https://github.com/apache/lucene/pull/12778#discussion_r1384477425
##########
lucene/core/src/test/org/apache/lucene/util/TestByteBlockPool.java:
##########
@@ -25,7 +24,34 @@
public class TestByteBlockPool extends LuceneTestCase {
- public void testReadAndWrite() throws IOException {
+ public void testAppendFromOtherPool() {
+ ByteBlockPool pool = new ByteBlockPool(new
ByteBlockPool.DirectAllocator());
+ final int numBytes = atLeast(2 << 16);
+ byte[] bytes = new byte[numBytes];
+ for (int i = 0; i < numBytes; i++) {
+ bytes[i] = (byte) random().nextInt(256);
Review Comment:
Thank you! I changed to RandomBytes & TestUtil. It seems we are also banning
the `random().nextInt()` call in https://github.com/apache/lucene/issues/12771
--
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]