diff options
author | Pete Bentley <prb@google.com> | 2019-11-12 13:47:27 +0000 |
---|---|---|
committer | Pete Bentley <prb@google.com> | 2019-11-13 11:34:19 +0000 |
commit | cfa1eecf1313e68fb8e7e8e2428c60221c0768d7 (patch) | |
tree | 34cc4925d20984dfcb73597469006df77147aa8c /harmony-tests | |
parent | 363dc35ec7e0be1911b2949953e5f3e2466bf73b (diff) |
Don't close SSLSocket streams during HandshakeCompletedEventTest.
Closing the InputStream returned by SSLSocket.getInputStream()
should cause the associated socket to be closed:
https://developer.android.com/reference/java/net/Socket.html#getInputStream()
Similarly for SSLSocket.getOutStream().
ConscryptEngineSocket actually implements that behaviour whereas
ConscryptFileDescriptorSocket does not, causing this test to fail
when using engine-based sockets.
As the stream closure is not really relevant to the rest of the
test, simply remove it so the test passes on both implementations
of SSLSocket.
Bug: 143682035
Test: atest CtsLibcoreTestCases:HandshakeCompletedEventTest
for both Conscrypt implementations of SSLSocket
Change-Id: I5cff8a40fcfc1c26fa685f7dbdd72d63b5df5f4f
Diffstat (limited to 'harmony-tests')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java index 74c3a7faff..d82068929f 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java @@ -431,8 +431,6 @@ public class HandshakeCompletedEventTest extends TestCase { assertEquals(i, j); } - istream.close(); - OutputStream ostream = clientSocket.getOutputStream(); for (int i = 0; i < 256; i++) { @@ -503,7 +501,6 @@ public class HandshakeCompletedEventTest extends TestCase { } ostream.flush(); - ostream.close(); InputStream istream = socket.getInputStream(); |