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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user