| | |
| | | import org.opends.messages.Severity; |
| | | import org.opends.server.DirectoryServerTestCase; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.admin.std.meta.ReplicationServerCfgDefn.ReplicationDBImplementation; |
| | | import org.opends.server.admin.std.server.ReplicationDomainCfg; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.config.ConfigException; |
| | |
| | | import org.opends.server.replication.protocol.ReplicationMsg; |
| | | import org.opends.server.replication.protocol.Session; |
| | | import org.opends.server.replication.server.ReplicationServer; |
| | | import org.opends.server.replication.server.changelog.file.FileChangelogDB; |
| | | import org.opends.server.replication.server.changelog.je.JEChangelogDB; |
| | | import org.opends.server.replication.service.ReplicationBroker; |
| | | import org.opends.server.schema.IntegerSyntax; |
| | |
| | | protected Entry synchroServerEntry; |
| | | protected Entry replServerEntry; |
| | | |
| | | private static final String REPLICATION_DB_IMPL_PROPERTY = "org.opends.test.replicationDbImpl"; |
| | | |
| | | public static ReplicationDBImplementation replicationDbImplementation = ReplicationDBImplementation.valueOf( |
| | | System.getProperty(REPLICATION_DB_IMPL_PROPERTY, ReplicationDBImplementation.LOG.name())); |
| | | |
| | | /** |
| | | * Replication monitor stats |
| | | */ |
| | |
| | | LDAPReplicationDomain replDomain = LDAPReplicationDomain.retrievesReplicationDomain(baseDN); |
| | | genId = replDomain.getGenerationID(); |
| | | } |
| | | catch(Exception e) {} |
| | | catch(Exception e) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return genId; |
| | | } |
| | | |
| | |
| | | @AfterClass |
| | | public void classCleanUp() throws Exception |
| | | { |
| | | logError(Message.raw(Category.SYNC, Severity.NOTICE, |
| | | " ##### Calling ReplicationTestCase.classCleanUp ##### ")); |
| | | logError(Message.raw(Category.SYNC, Severity.NOTICE, " ##### Calling ReplicationTestCase.classCleanUp ##### ")); |
| | | |
| | | removeReplicationServerDB(); |
| | | |
| | |
| | | |
| | | protected void clearChangelogDB(ReplicationServer rs) throws Exception |
| | | { |
| | | ((JEChangelogDB) rs.getChangelogDB()).clearDB(); |
| | | if (replicationDbImplementation == ReplicationDBImplementation.JE) |
| | | { |
| | | ((JEChangelogDB) rs.getChangelogDB()).clearDB(); |
| | | } |
| | | else |
| | | { |
| | | ((FileChangelogDB) rs.getChangelogDB()).clearDB(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | + " Also received the following messages during wait time: " + msgs); |
| | | return null; |
| | | } |
| | | |
| | | protected static void setReplicationDBImplementation(ReplicationDBImplementation impl) |
| | | { |
| | | replicationDbImplementation = impl; |
| | | } |
| | | } |