From 7b2c66b678a97d7d8b4c2ec918db17db2058e6d4 Mon Sep 17 00:00:00 2001 From: Adam Vartanian Date: Thu, 6 Jul 2017 15:43:52 +0100 Subject: [PATCH] Streamline testInstall_compatibleContext() Conscrypt is making ClientSessionContext#getSession() private since users shouldn't be calling it, which causes this test to fail to build. While this test uses it, in practice the only non-Conscrypt code it's testing is SSLSessionCache#install(), the rest of it just tests that Conscrypt works properly. We reduce the test to just a test of the SSLSessionCache code, since Conscrypt's tests should suffice for testing Conscrypt's use of the cache. Test: adb shell am instrument -w -e class android.net.SSLSessionCacheTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner Change-Id: Iea61c47eb2c002629dd2f50c81d5bc4f7221c654 --- core/tests/coretests/src/android/net/SSLSessionCacheTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/tests/coretests/src/android/net/SSLSessionCacheTest.java b/core/tests/coretests/src/android/net/SSLSessionCacheTest.java index ec130e0496764..11d066b3afb05 100644 --- a/core/tests/coretests/src/android/net/SSLSessionCacheTest.java +++ b/core/tests/coretests/src/android/net/SSLSessionCacheTest.java @@ -44,12 +44,9 @@ public class SSLSessionCacheTest extends TestCase { try { SSLSessionCache.install(new SSLSessionCache(mock), ctx); - clientCtx.getSession("www.foogle.com", 443); - Mockito.verify(mock).getSessionData(Mockito.anyString(), Mockito.anyInt()); } finally { // Restore cacheless behaviour. SSLSessionCache.install(null, ctx); - clientCtx.getSession("www.foogle.com", 443); Mockito.verifyNoMoreInteractions(mock); } }