Bill commented on code in PR #7449: URL: https://github.com/apache/geode/pull/7449#discussion_r844422225
########## 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: I initially did it the way you suggest. But it turns out the way this test works it makes more sense the way it is now. See the test setup calls `TestSSLEngine.addReturnResult(SSLEngineResult... sslEngineResult)` to set the sequence of results to return from calls to the test engine's `wrap()` method. So the expectation in this case is that the state we would return, in this case `BUFFER_OVERFLOW`, matches the expectation set in `addReturnResult()`. Hope you agree. -- 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: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org