Bill commented on a change in pull request #5525:
URL: https://github.com/apache/geode/pull/5525#discussion_r491065723



##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/net/BufferPoolTest.java
##########
@@ -133,27 +135,42 @@ public void checkBufferSizeAfterAllocation() throws 
Exception {
 
   @Test
   public void checkBufferSizeAfterAcquire() throws Exception {
+    // allocate a small buffer and a larger buffer. Check their sizes, etc and 
then
+    // release and reacquire them. They should be from separate buffer pools 
so there
+    // should still be a small buffer and a larger buffer.
     ByteBuffer buffer = bufferPool.acquireDirectReceiveBuffer(100);
 
     ByteBuffer newBuffer =
         bufferPool.acquireDirectReceiveBuffer(10000);
-    assertThat(buffer.capacity()).isGreaterThanOrEqualTo(4096);
-    assertThat(newBuffer.capacity()).isGreaterThanOrEqualTo(32768);
+    assertThat(buffer.capacity()).isEqualTo(100);
+    assertThat(newBuffer.capacity()).isEqualTo(10000);
+    assertThat(buffer.isDirect()).isTrue();
+    assertThat(newBuffer.isDirect()).isTrue();
+    assertThat(bufferPool.getPoolableBuffer(buffer).capacity())
+        .isGreaterThanOrEqualTo(4096);

Review comment:
       I'm retracting that comment since these constants existed before this PR.
   
   Any such changes should be pursued in connection with a refactoring ticket.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to