Partial fix for OPENDJ-115: Make replication connection timeouts and various monitoring intervals configurable
Try increasing connection timeouts from 500ms to 4s in order to tolerate slow. Values are hard-coded for now, but this will at least indicate if network timeouts are the cause of unit test failures.
| | |
| | | */ |
| | | public static final int HANDSHAKE_TIMEOUT = 4000; |
| | | |
| | | /** |
| | | * The default connection timeout. |
| | | */ |
| | | public static final int CONNECTION_TIMEOUT = 4000; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | InetSocketAddress ServerAddr = new InetSocketAddress( |
| | | InetAddress.getByName(hostname), Integer.parseInt(port)); |
| | | socket.setTcpNoDelay(true); |
| | | socket.connect(ServerAddr, 500); |
| | | socket.connect(ServerAddr, ReplSessionSecurity.CONNECTION_TIMEOUT); |
| | | |
| | | session = replSessionSecurity.createClientSession(socket, |
| | | ReplSessionSecurity.HANDSHAKE_TIMEOUT); |
| | |
| | | socket = new Socket(); |
| | | socket.setReceiveBufferSize(1000000); |
| | | socket.setTcpNoDelay(true); |
| | | socket.connect(serverAddr, 500); |
| | | socket.connect(serverAddr, ReplSessionSecurity.CONNECTION_TIMEOUT); |
| | | localSession = replSessionSecurity.createClientSession( |
| | | socket, ReplSessionSecurity.HANDSHAKE_TIMEOUT); |
| | | boolean isSslEncryption = replSessionSecurity |
| | |
| | | new InetSocketAddress("localhost", port); |
| | | Socket socket = new Socket(); |
| | | socket.setTcpNoDelay(true); |
| | | socket.connect(serverAddr, 500); |
| | | socket.connect(serverAddr, ReplSessionSecurity.CONNECTION_TIMEOUT); |
| | | |
| | | // Create client session |
| | | fakePort++; |
| | |
| | | Socket socket = new Socket(); |
| | | socket.setReceiveBufferSize(1000000); |
| | | socket.setTcpNoDelay(true); |
| | | socket.connect(ServerAddr, 500); |
| | | socket.connect(ServerAddr, ReplSessionSecurity.CONNECTION_TIMEOUT); |
| | | ReplSessionSecurity replSessionSecurity = getReplSessionSecurity(); |
| | | ProtocolSession session = |
| | | replSessionSecurity.createClientSession(socket, |