Skip to content

Commit

Permalink
Migrato to Java: ScatteringTest
Browse files Browse the repository at this point in the history
  • Loading branch information
marianobarrios committed Nov 26, 2023
1 parent 674911e commit f5a4914
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
25 changes: 25 additions & 0 deletions src/test/scala/tlschannel/ScatteringTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package tlschannel;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import scala.Option;
import tlschannel.helpers.Loops;
import tlschannel.helpers.SocketPair;
import tlschannel.helpers.SocketPairFactory;
import tlschannel.helpers.SslContextFactory;

@TestInstance(Lifecycle.PER_CLASS)
public class ScatteringTest {

private final SslContextFactory sslContextFactory = new SslContextFactory();
private final SocketPairFactory factory = new SocketPairFactory(sslContextFactory.defaultContext());

private static final int dataSize = 150 * 1000;

@Test
public void testHalfDuplex() {
SocketPair socketPair = factory.nioNio(Option.apply(null), Option.apply(null), true, false, Option.apply(null));
Loops.halfDuplex(socketPair, dataSize, true, false);
}
}
23 changes: 0 additions & 23 deletions src/test/scala/tlschannel/ScatteringTest.scala

This file was deleted.

0 comments on commit f5a4914

Please sign in to comment.