mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

coulbeck
08.42.2007 cbccf77f319699c5aa7d38a081e033161fe63a91
Disable SchemaSynchronizationTestCase.pushSchemaFilesChange because it causes schema tests in AddOperationTestCase to fail in some build environments.
1 files modified
18 ■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/SchemaSynchronizationTest.java 18 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/SchemaSynchronizationTest.java
@@ -33,19 +33,16 @@
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;
@@ -233,7 +230,7 @@
    ChangelogBroker broker =
      openChangelogSession(baseDn, (short) 2, 100, changelogPort, 5000, true);
    ChangeNumberGenerator gen = new ChangeNumberGenerator((short)2, 0);
    ModifyMsg modMsg = new ModifyMsg(gen.NewChangeNumber(),
@@ -252,8 +249,11 @@
   * 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,
@@ -303,11 +303,11 @@
    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();
@@ -315,9 +315,9 @@
    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;