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

gbellato
02.43.2007 51348a3ea34fba020f94ce15a3faa1189b45fe33
Enable some of the total update replication tests
3 files modified
70 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 31 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java 35 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
@@ -358,6 +358,10 @@
                  Message message = ERR_CANNOT_RECOVER_CHANGES.get(
                      baseDn.toNormalizedString());
                  logError(message);
                  replicationServer = ServerAddr.toString();
                  maxSendWindow = replServerStartMsg.getWindowSize();
                  connected = true;
                  startHeartBeat();
                }
                else
                {
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -128,9 +128,6 @@
  // The base DNs for this backend.
  private DN[] baseDNs;
  // The mapping between parent DNs and their immediate children.
  private HashMap<DN,HashSet<DN>> childDNs;
  // The base DNs for this backend, in a hash set.
  private HashSet<DN> baseDNSet;
@@ -229,8 +226,6 @@
      baseDNSet.add(dn);
    }
    childDNs = new HashMap<DN,HashSet<DN>>();
    supportedControls = new HashSet<String>();
    supportedFeatures = new HashSet<String>();
@@ -1090,32 +1085,6 @@
    }
  }
  /**
   * Export the changes for a given ReplicationCache.
   */
  private void searchContainer2(ReplicationCache rc,
      SearchOperation searchOperation)
  throws DirectoryException
  {
    // Walk through the servers
    for (Short serverId : rc.getServers())
    {
      ReplicationIterator ri = rc.getChangelogIterator(serverId,
          null);
      if (ri == null)
        break;
      // Walk through the changes
      while (ri.getChange() != null)
      {
        UpdateMessage msg = ri.getChange();
        processChange(msg, null, null, searchOperation);
        if (!ri.next())
          break;
      }
    }
  }
  /**
   * Retrieves the replication server associated to this backend.
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
@@ -552,6 +552,11 @@
          log("Broker " + serverID + " receives and trashes " + msg);
        }
      }
      catch (SocketTimeoutException e)
      {
        log("SocketTimeoutException while waiting fro entries" +
            stackTraceToSingleLineString(e));
      }
      catch(Exception e)
      {
        log("receiveUpdatedEntries" + stackTraceToSingleLineString(e));
@@ -645,6 +650,7 @@
        DirectoryServer.getConfigHandler().addEntry(synchroServerEntry, null);
        assertNotNull(DirectoryServer.getConfigEntry(synchroServerEntry.getDN()),
        "Unable to add the synchronized server");
        super.configEntryList.add(synchroServerEntry.getDN());
        replDomain = ReplicationDomain.retrievesReplicationDomain(baseDn);
@@ -690,7 +696,7 @@
  /**
   * Tests the import side of the Initialize task
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeImport() throws Exception
  {
    String testCase = "InitializeImport";
@@ -746,7 +752,7 @@
  /**
   * Tests the export side of the Initialize task
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeExport() throws Exception
  {
    String testCase = "Replication/InitializeExport";
@@ -780,7 +786,7 @@
  /**
   * Tests the import side of the InitializeTarget task
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeTargetExport() throws Exception
  {
    String testCase = "Replication/InitializeTargetExport";
@@ -820,7 +826,7 @@
  /**
   * Tests the import side of the InitializeTarget task
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeTargetExportAll() throws Exception
  {
    String testCase = "Replication/InitializeTargetExportAll";
@@ -840,7 +846,8 @@
      server2 = openReplicationSession(DN.decode("dc=example,dc=com"),
        server2ID, 100, getChangelogPort(changelog1ID), 1000, emptyOldChanges);
    ReplicationBroker server3 = openReplicationSession(DN.decode("dc=example,dc=com"),
    if (server3==null)
    server3 = openReplicationSession(DN.decode("dc=example,dc=com"),
        server3ID, 100, getChangelogPort(changelog1ID), 1000, emptyOldChanges);
    Thread.sleep(1000);
@@ -864,7 +871,7 @@
 /**
   * Tests the import side of the InitializeTarget task
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeTargetImport() throws Exception
  {
    String testCase = "InitializeTargetImport";
@@ -959,7 +966,7 @@
  /**
   * Tests the import side of the InitializeTarget task
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeConfigErrors() throws Exception
  {
    String testCase = "InitializeConfigErrors";
@@ -1047,7 +1054,7 @@
   * ReplServerInfoMessage(s) exchanged by the replication
   * servers.
   */
  @Test(enabled=false)
  @Test(enabled=true)
  public void testReplServerInfos() throws Exception
  {
    String testCase = "Replication/TestReplServerInfos";
@@ -1122,6 +1129,8 @@
  @Test(enabled=false)
  public void initializeTargetExportMultiSS() throws Exception
  {
    try
    {
    String testCase = "Replication/InitializeTargetExportMultiSS";
    log("Starting " + testCase);
@@ -1156,16 +1165,18 @@
    // Tests that entries have been received by S2
    receiveUpdatedEntries(server2, server2ID, updatedEntries);
      log("Successfully ending " + testCase);
    }
    finally
    {
    afterTest();
    changelog2.shutdown();
    changelog2 = null;
    log("Successfully ending " + testCase);
    }
  }
  @Test(enabled=false)
  @Test(enabled=true)
  public void initializeExportMultiSS() throws Exception
  {
    String testCase = "Replication/InitializeExportMultiSS";