| | |
| | | try |
| | | { |
| | | Thread.sleep(1000); |
| | | rb.start(); |
| | | } catch (InterruptedException ex) |
| | | { |
| | | fail("Error sleeping " + stackTraceToSingleLineString(ex)); |
| | |
| | | { |
| | | // Timeout reached, end with error |
| | | fail("checkConnection: DS " + rb.getServerId() + " is not connected to " |
| | | + "the RS port " + rsPort + " after " + secTimeout + " seconds."); |
| | | + "the RS port " + rsPort + " after " + secTimeout + " seconds."); |
| | | } |
| | | } |
| | | } |
| | |
| | | ArrayList<String> servers = new ArrayList<String>(1); |
| | | servers.add("localhost:" + port); |
| | | broker.start(servers); |
| | | checkConnection(30, broker, port); |
| | | if (timeout != 0) |
| | | broker.setSoTimeout(timeout); |
| | | |
| | |
| | | ArrayList<String> servers = new ArrayList<String>(1); |
| | | servers.add("localhost:" + port); |
| | | broker.start(servers); |
| | | checkConnection(30, broker, port); |
| | | if (timeout != 0) |
| | | broker.setSoTimeout(timeout); |
| | | if (emptyOldChanges) |
| | |
| | | ArrayList<String> servers = new ArrayList<String>(1); |
| | | servers.add("localhost:" + rs1Port); |
| | | broker.start(servers); |
| | | checkConnection(30, broker, rs1Port); |
| | | |
| | | return broker; |
| | | } |
| | |
| | | */ |
| | | server1 = openReplicationSession( |
| | | DN.decode(TEST_ROOT_DN_STRING), 1, 100, replicationServerPort, |
| | | 1000, true); |
| | | 1000, false); |
| | | server2 = openReplicationSession( |
| | | DN.decode(TEST_ROOT_DN_STRING), 2, 100, replicationServerPort, |
| | | 1000, true); |
| | | 1000, false); |
| | | |
| | | assertTrue(server1.isConnected()); |
| | | assertTrue(server2.isConnected()); |
| | |
| | | openReplicationSession(DN.decode(TEST_ROOT_DN_STRING), 3, |
| | | 100, replicationServerPort, 5000, state); |
| | | |
| | | assertTrue(broker.isConnected(), "Broker could not connect to RS"); |
| | | |
| | | ReplicationMsg msg2 = broker.receive(); |
| | | broker.updateWindowAfterReplay(); |
| | | if (!(msg2 instanceof DeleteMsg)) |