pivotal-jbarrett commented on a change in pull request #7131:
URL: https://github.com/apache/geode/pull/7131#discussion_r753465082
##########
File path:
geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/P2PMessagingConcurrencyDUnitTest.java
##########
@@ -51,12 +53,20 @@
import org.apache.geode.test.version.VersionManager;
/**
- * Tests one-way P2P messaging between two peers. A shared,
- * ordered connection is used and many concurrent tasks
- * compete on the sending side. Tests with TLS enabled
- * to exercise ByteBufferSharing and friends.
+ * Tests one-way P2P messaging between two peers.
+ * Many concurrent tasks compete on the sending side.
+ * The main purpose of the test is to exercise
+ * ByteBufferSharing and friends.
+ *
+ * Tests combinations of: conserve-sockets true/false,
+ * TLS on/off, and socket-buffer-size for sender
+ * and receiver both set to the default (and equal)
+ * and set to the sender's buffer twice as big as the
+ * receiver's buffer.
+ *
*/
@Category({MembershipTest.class})
+@RunWith(JUnitParamsRunner.class)
Review comment:
You need the category params runner or delete the category, without that
runner the category is ignored.
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
##########
@@ -2846,6 +2846,9 @@ private void processInputBuffer(AbstractExecutor
threadMonitorExecutor)
"Allocating larger network read buffer, new size is {}
old size was {}.",
allocSize, oldBufferSize);
inputBuffer =
inputSharing.expandReadBufferIfNeeded(allocSize);
+ // we're returning to the caller (done == true) so make
buffer writable
Review comment:
If we have to comment it to make it readable perhaps it deserves a well
named method.
```java
...
makeWriteable(inputBuffer);
...
void makeWriteable(final ByteByffer buffer) {
buffer.position(buffer.limit());
buffer.limit(buffer.capacity());
}
```
Now this method is unit testable too.
--
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]