chesnokoff commented on code in PR #13487:
URL: https://github.com/apache/ignite/pull/13487#discussion_r3796616614


##########
modules/core/src/test/java/org/apache/ignite/internal/binary/streams/ThreadLocalAllocatorChunkShrinkTest.java:
##########
@@ -0,0 +1,113 @@
+package org.apache.ignite.internal.binary.streams;
+
+import java.lang.reflect.Field;
+import org.apache.ignite.IgniteCommonsSystemProperties;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static 
org.apache.ignite.IgniteCommonsSystemProperties.IGNITE_MARSHAL_BUFFERS_RECHECK;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * This test should demonstrate how ThreadLocalAllocator$Chunk shrinks if a 
small message is written after a large one.
+ * <p>
+ * Shrink logic is executed only if enough time has passed to check size 
again. For the ease of testing the
+ * corresponding system property is set to make the check run at every 
invocation of
+ * {@link BinaryMemoryAllocatorChunk#release(byte[], int)}. The small message 
size is set to less than half of the
+ * buffer size for the large message to make the chunk shrink.
+ * </p>
+ */
+public class ThreadLocalAllocatorChunkShrinkTest {

Review Comment:
   In Apache Ignite, every test should belong to a specific test suite. Please 
add this test to `IgniteBinaryObjectsTestSuite`



##########
modules/core/src/test/java/org/apache/ignite/internal/binary/streams/ThreadLocalAllocatorChunkShrinkTest.java:
##########
@@ -0,0 +1,113 @@
+package org.apache.ignite.internal.binary.streams;

Review Comment:
   ```suggestion
   /*
    * Licensed to the Apache Software Foundation (ASF) under one or more
    * contributor license agreements.  See the NOTICE file distributed with
    * this work for additional information regarding copyright ownership.
    * The ASF licenses this file to You under the Apache License, Version 2.0
    * (the "License"); you may not use this file except in compliance with
    * the License.  You may obtain a copy of the License at
    *
    *      http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
   package org.apache.ignite.internal.binary.streams;
   ```



##########
modules/core/src/test/java/org/apache/ignite/internal/binary/streams/ThreadLocalAllocatorChunkShrinkTest.java:
##########
@@ -0,0 +1,113 @@
+package org.apache.ignite.internal.binary.streams;

Review Comment:
   Every file has license at beginning of a file



-- 
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]

Reply via email to