| | |
| | | import org.opends.server.workflowelement.externalchangelog.ECLWorkflowElement; |
| | | import org.opends.server.workflowelement.localbackend.LocalBackendModifyDNOperation; |
| | | import org.testng.Assert; |
| | | import org.testng.annotations.AfterClass; |
| | | import org.testng.annotations.AfterMethod; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | import org.testng.annotations.*; |
| | | |
| | | import static org.assertj.core.api.Assertions.*; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | |
| | | * Tests for the replicationServer code. |
| | | */ |
| | | @SuppressWarnings("javadoc") |
| | | // repeating the @Test annotation here to try to ensure the tests are run |
| | | // singleThreaded and avoid random failures in continuous integration |
| | | @Test(groups = { "precommit", "replication" }, sequential = true) |
| | | public class ExternalChangeLogTest extends ReplicationTestCase |
| | | { |
| | | |
| | |
| | | @Test(enabled=true, dependsOnMethods = { "ECLReplicationServerTest"}) |
| | | public void ECLReplicationServerTest2() throws Exception |
| | | { |
| | | // Test ECL after changelog triming |
| | | // Test ECL after changelog trimming |
| | | ECLAfterChangelogTrim(); |
| | | } |
| | | |
| | |
| | | // Expect only entry from o=test returned |
| | | entries = searchOp.getSearchEntries(); |
| | | assertThat(entries).hasSize(1); |
| | | entries.get(0); |
| | | debugAndWriteEntries(null, entries, tn); |
| | | |
| | | // Test lastExternalChangelogCookie attribute of the ECL |
| | |
| | | new MultiDomainServerState("o=test:" + csn1 + ";"); |
| | | |
| | | String lastCookie = readLastCookie(); |
| | | |
| | | assertTrue(expectedLastCookie.equalsTo(new MultiDomainServerState(lastCookie)), |
| | | " Expected last cookie attribute value:" + expectedLastCookie + |
| | | " Read from server: " + lastCookie + " are equal :"); |
| | |
| | | null); |
| | | } |
| | | |
| | | /** Test ECL content after replication changelogdb triming */ |
| | | /** Test ECL content after replication changelogDB trimming */ |
| | | private void ECLAfterChangelogTrim() throws Exception |
| | | { |
| | | String tn = "ECLAfterChangelogTrim"; |