Bill commented on code in PR #7449:
URL: https://github.com/apache/geode/pull/7449#discussion_r844485311
##########
geode-core/src/test/java/org/apache/geode/internal/net/NioSslEngineTest.java:
##########
@@ -595,10 +602,17 @@ public int getNumberOfUnwraps() {
@Override
public SSLEngineResult wrap(ByteBuffer[] sources, int i, int i1,
ByteBuffer destination) {
- for (ByteBuffer source : sources) {
+ assert sources.length == 1;
+ final ByteBuffer source = sources[0];
+ final SSLEngineResult nextResult = nextResult();
+ try {
destination.put(source);
+ } catch (final BufferOverflowException e) {
+ assertThat(BUFFER_OVERFLOW)
Review Comment:
This logic is simulating part of the `SSLEngine`:

What we've "got" here is a buffer overflow situation, which the engine would
interpret as a `BUFFER_OVERFLOW` status. What we "expect" (as expressed in the
test setup's earlier call to `addReturnResult(SSLEngineResult...
sslEngineResult)` is found in `nextResult.getStatus()`.
--
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]