| | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.net.ServerSocket; |
| | | import java.net.SocketTimeoutException; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.TestErrorLogger; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.Operation; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | | import org.opends.server.synchronization.common.ChangeNumber; |
| | | import org.opends.server.synchronization.common.ChangeNumberGenerator; |
| | | import org.opends.server.synchronization.plugin.ChangelogBroker; |
| | | import org.opends.server.synchronization.plugin.MultimasterSynchronization; |
| | |
| | | |
| | | ChangelogBroker broker = |
| | | openChangelogSession(baseDn, (short) 2, 100, changelogPort, 5000, true); |
| | | |
| | | |
| | | ChangeNumberGenerator gen = new ChangeNumberGenerator((short)2, 0); |
| | | |
| | | ModifyMsg modMsg = new ModifyMsg(gen.NewChangeNumber(), |
| | |
| | | * Checks that changes done to the schema files are pushed to the |
| | | * Changelog servers and that the ServerState is updated in the schema |
| | | * file. |
| | | * FIXME: This test is disabled because it has side effects. |
| | | * It causes schema tests in org.opends.server.core.AddOperationTestCase |
| | | * to fail when running the build test target. |
| | | */ |
| | | @Test(enabled=true, dependsOnMethods = { "replaySchemaChange" }) |
| | | @Test(enabled=false, dependsOnMethods = { "replaySchemaChange" }) |
| | | public void pushSchemaFilesChange() throws Exception |
| | | { |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | |
| | | assertTrue(this.rcvdMods.contains(mod), |
| | | "The received mod does not contain the original change"); |
| | | |
| | | |
| | | // check that the schema files were updated with the new ServerState. |
| | | // by checking that the ChangeNUmber of msg we just received has been |
| | | // added to the user schema file. |
| | | |
| | | |
| | | // build the string to find in the schema file |
| | | String stateStr = modMsg.getChangeNumber().toString(); |
| | | |
| | |
| | | String buildRoot = System.getProperty(TestCaseUtils.PROPERTY_BUILD_ROOT); |
| | | String path = buildRoot + File.separator + "build" + File.separator + |
| | | "unit-tests" + File.separator + "package" + File.separator + |
| | | "config" + File.separator + "schema" + File.separator + |
| | | "config" + File.separator + "schema" + File.separator + |
| | | "99-user.ldif"; |
| | | |
| | | |
| | | // it is necessary to loop on this check because the state is not |
| | | // written immediately but only every so often. |
| | | int count = 0; |