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

Commit c93ce193 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fix and re-enable Conscrypt PerfTests." into main am: d17a5d5d...

Merge "Merge "Fix and re-enable Conscrypt PerfTests." into main am: d17a5d5d am: 277ba4b2" into main
parents dbaf2ae7 eb9d7686
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;

import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -143,7 +142,7 @@ public final class ClientSocketPerfTest {

        // Always use the same server for consistency across the benchmarks.
        server = config.serverFactory().newServer(
                ChannelType.CHANNEL, config.messageSize(), config.protocol().getProtocols(),
                config.messageSize(), config.protocol().getProtocols(),
                ciphers(config));

        server.setMessageProcessor(new ServerEndpoint.MessageProcessor() {
@@ -197,7 +196,6 @@ public final class ClientSocketPerfTest {
     */
    @Test
    @Parameters(method = "getParams")
    @Ignore("b/351034205")
    public void time(Config config) throws Exception {
        reset();
        setup(config);
+2 −2
Original line number Diff line number Diff line
@@ -43,10 +43,10 @@ public enum EndpointFactory {
        factories.clientFactory, channelType, port, protocols, ciphers);
  }

  public ServerEndpoint newServer(ChannelType channelType, int messageSize,
  public ServerEndpoint newServer(int messageSize,
      String[] protocols, String[] ciphers) throws IOException {
    return new ServerEndpoint(factories.serverFactory, factories.serverSocketFactory,
        channelType, messageSize, protocols, ciphers);
        messageSize, protocols, ciphers);
  }

  private static final class Factories {
+3 −7
Original line number Diff line number Diff line
@@ -34,8 +34,6 @@ import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;

import org.conscrypt.ChannelType;

/**
 * A simple socket-based test server.
 */
@@ -63,7 +61,6 @@ final class ServerEndpoint {
    }

    private final ServerSocket serverSocket;
    private final ChannelType channelType;
    private final SSLSocketFactory socketFactory;
    private final int messageSize;
    private final String[] protocols;
@@ -78,11 +75,10 @@ final class ServerEndpoint {
    private volatile Future<?> processFuture;

    ServerEndpoint(SSLSocketFactory socketFactory, SSLServerSocketFactory serverSocketFactory,
            ChannelType channelType, int messageSize, String[] protocols,
            int messageSize, String[] protocols,
            String[] cipherSuites) throws IOException {
        this.serverSocket = channelType.newServerSocket(serverSocketFactory);
        this.serverSocket = serverSocketFactory.createServerSocket();
        this.socketFactory = socketFactory;
        this.channelType = channelType;
        this.messageSize = messageSize;
        this.protocols = protocols;
        this.cipherSuites = cipherSuites;
@@ -134,7 +130,7 @@ final class ServerEndpoint {
                if (stopping) {
                    return;
                }
                socket = channelType.accept(serverSocket, socketFactory);
                socket = (SSLSocket) serverSocket.accept();
                socket.setEnabledProtocols(protocols);
                socket.setEnabledCipherSuites(cipherSuites);

+1 −4
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ import androidx.test.filters.LargeTest;
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;

import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -131,8 +130,7 @@ public final class ServerSocketPerfTest {

        final ChannelType channelType = config.channelType();

        server = config.serverFactory().newServer(
            channelType, config.messageSize(),
        server = config.serverFactory().newServer(config.messageSize(),
            new String[] {"TLSv1.3", "TLSv1.2"}, ciphers(config));
        server.setMessageProcessor(new MessageProcessor() {
            @Override
@@ -202,7 +200,6 @@ public final class ServerSocketPerfTest {

    @Test
    @Parameters(method = "getParams")
    @Ignore("b/351034205")
    public void throughput(Config config) throws Exception {
        setup(config);
        BenchmarkState state = mPerfStatusReporter.getBenchmarkState();