Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b2c66b6 authored by Adam Vartanian's avatar Adam Vartanian
Browse files

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
parent b171a46d
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);
        }
    }