mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
24.34.2011 a94cb8c8073c31b911020e8565bbd4bd60b37bad
opendj3/opendj-ldap-sdk/src/test/java/com/forgerock/opendj/ldap/DefaultTCPNIOTransportTestCase.java
File was renamed from opendj3/opendj-ldap-sdk/src/test/java/com/forgerock/opendj/ldap/LDAPDefaultTCPNIOTransportTestCase.java
@@ -32,19 +32,19 @@
import static org.testng.Assert.assertTrue;
import java.net.Socket;
import java.util.Random;
import org.forgerock.opendj.ldap.TestCaseUtils;
import org.glassfish.grizzly.nio.transport.TCPNIOTransport;
import org.testng.annotations.Test;
import com.forgerock.opendj.ldap.LDAPDefaultTCPNIOTransport;
import com.forgerock.opendj.ldap.DefaultTCPNIOTransport;
/**
 * Tests LDAPDefaultTCPNIOTransport class.
 * Tests DefaultTCPNIOTransport class.
 */
public class LDAPDefaultTCPNIOTransportTestCase extends LDAPTestCase
public class DefaultTCPNIOTransportTestCase extends LDAPTestCase
{
  /**
   * Tests the default transport.
@@ -56,13 +56,9 @@
  public void testGetInstance() throws Exception
  {
    // Create a transport.
    final TCPNIOTransport transport = LDAPDefaultTCPNIOTransport.getInstance();
    final Random r = new Random();
    int port = r.nextInt(10000);
    if (port < 1000)
    {
      port += 1000;
    }
    final TCPNIOTransport transport = DefaultTCPNIOTransport.getInstance();
    final int port = TestCaseUtils.findFreePort();
    transport.bind(port);
    // Establish a socket connection to see if the transport factory works.
    final Socket socket = new Socket("localhost", port);