Package org.teiid.net.socket

Examples of org.teiid.net.socket.SocketServerConnection


  }
 
  @Test public void testFailover() throws Exception {
    SSLConfiguration config = new SSLConfiguration();
    Properties p = new Properties();
    SocketServerConnection conn = helpEstablishConnection(false, config, p);
    assertTrue(conn.isOpen(1000));
    //restart the second instance now that we know the connection was made to the first
    listener1 = createListener(new InetSocketAddress(addr.getAddress(), listener1.getPort()), config);
    listener.stop();
    conn.isOpen(1000); //there is a chance this call can fail
    assertTrue(conn.isOpen(1000));
    listener1.stop();
    //both instances are down
    assertFalse(conn.isOpen(1000));
    //bring the first back up
    listener = createListener(new InetSocketAddress(addr.getAddress(), listener.getPort()), config);
    assertTrue(conn.isOpen(1000));
    assertEquals(3, logonAttempts);
    conn.close();
  }
View Full Code Here

TOP

Related Classes of org.teiid.net.socket.SocketServerConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.