diff options
Diffstat (limited to 'jrt/tests')
-rw-r--r-- | jrt/tests/com/yahoo/jrt/LatencyTest.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jrt/tests/com/yahoo/jrt/LatencyTest.java b/jrt/tests/com/yahoo/jrt/LatencyTest.java index c8ead8ebf77..1c736fb28ea 100644 --- a/jrt/tests/com/yahoo/jrt/LatencyTest.java +++ b/jrt/tests/com/yahoo/jrt/LatencyTest.java @@ -17,12 +17,15 @@ public class LatencyTest { private final Supervisor server; private final Supervisor client; private final Acceptor acceptor; - public Network(CryptoEngine crypto, int threads) throws ListenFailedException { + public Network(CryptoEngine crypto, int threads, boolean dropEmpty) throws ListenFailedException { server = new Supervisor(new Transport("server", crypto, threads)); client = new Supervisor(new Transport("client", crypto, threads)); + server.setDropEmptyBuffers(dropEmpty); + client.setDropEmptyBuffers(dropEmpty); server.addMethod(new Method("inc", "i", "i", this::rpc_inc)); acceptor = server.listen(new Spec(0)); } + public Network(CryptoEngine crypto, int threads) throws ListenFailedException { this(crypto, threads, false); } public Target connect() { return client.connect(new Spec("localhost", acceptor.port())); } @@ -188,6 +191,13 @@ public class LatencyTest { } @org.junit.Test + public void testTlsCryptoWithDropEmptyBuffersLatency() throws Throwable { + try (Network network = new Network(new TlsCryptoEngine(createTestTlsContext()), 1, true)) { + new Client(false, network, 1).measureLatency("[tls crypto, drop empty, no reconnect] "); + } + } + + @org.junit.Test public void testTransportThreadScaling() throws Throwable { try (Network network = new Network(new NullCryptoEngine(), 1)) { new Client(false, network, 64).measureLatency("[64 clients, 1/1 transport] "); |