| | |
| | | import org.opends.server.replication.common.CSNGenerator; |
| | | import org.opends.server.replication.common.ServerStatus; |
| | | import org.opends.server.replication.plugin.LDAPReplicationDomain; |
| | | import org.opends.server.replication.plugin.MultimasterReplication; |
| | | import org.opends.server.replication.protocol.*; |
| | | import org.opends.server.replication.server.ReplServerFakeConfiguration; |
| | | import org.opends.server.replication.server.ReplicationBackend; |
| | |
| | | |
| | | private void debugInfo(String message, Exception e) |
| | | { |
| | | debugInfo(message + stackTraceToSingleLineString(e)); |
| | | debugInfo(message + " " + stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | | /** |
| | |
| | | debugInfo(testCase + " ** TEST ** The part of the topology with the right gen ID should work well"); |
| | | |
| | | // Now create a change that must be replicated |
| | | assertConnectedToReplicationDomain(); |
| | | addTestEntriesToDB(createEntry(UUID.randomUUID())); |
| | | |
| | | // Verify that RS1 does contain the change related to this ADD. |
| | |
| | | "Expecting that DS3 with old gen ID is in bad gen id from RS1"); |
| | | |
| | | debugInfo("Add entries to DS1, update should not be sent to DS2 and DS3 that are in bad gen id"); |
| | | assertConnectedToReplicationDomain(); |
| | | addTestEntriesToDB(createEntry(UUID.randomUUID())); |
| | | |
| | | debugInfo("RS1 must have stored that update."); |
| | |
| | | } |
| | | } |
| | | |
| | | private void assertConnectedToReplicationDomain() |
| | | { |
| | | assertTrue(MultimasterReplication.findDomain(baseDN, null).isConnected(), |
| | | "The server should be connected to replication domain" + baseDN |
| | | + " at this point"); |
| | | } |
| | | |
| | | private Entry createSetGenerationIdTask(Long genId, String additionalAttribute) throws Exception |
| | | { |
| | | String genIdString = genId != null ? genId.toString() : ""; |
| | |
| | | assertEquals(readGenIdFromSuffixRootEntry(), -1, |
| | | "genId attribute should not be retrievable since there are NO entry in the backend"); |
| | | |
| | | assertConnectedToReplicationDomain(); |
| | | addTestEntriesToDB(updatedEntries); |
| | | assertEquals(readGenIdFromSuffixRootEntry(), EMPTY_DN_GENID, |
| | | "genId attribute should be retrievable since there IS one entry in the backend"); |