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

Jean-Noel Rouvignac
09.34.2013 585d1bf2936de4197aaf3af84f07a5607e013a1e
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/StressTest.java
@@ -25,22 +25,19 @@
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock As.
 */
package org.opends.server.replication;
import static org.opends.server.loggers.ErrorLogger.logError;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import static org.opends.server.TestCaseUtils.*;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.testng.Assert.*;
import java.net.ServerSocket;
import java.util.LinkedList;
import java.util.List;
import org.opends.server.TestCaseUtils;
import org.opends.messages.Category;
import org.opends.messages.Severity;
import org.opends.messages.Message;
import org.opends.messages.Severity;
import org.opends.server.TestCaseUtils;
import org.opends.server.admin.std.server.MonitorProviderCfg;
import org.opends.server.api.MonitorProvider;
import org.opends.server.config.ConfigException;
@@ -48,25 +45,17 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.ModifyOperation;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.replication.service.ReplicationBroker;
import org.opends.server.replication.protocol.AddMsg;
import org.opends.server.replication.protocol.ReplicationMsg;
import org.opends.server.types.Attribute;
import org.opends.server.types.Attributes;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
import org.opends.server.types.Modification;
import org.opends.server.types.Operation;
import org.opends.server.types.OperationType;
import org.opends.server.types.ResultCode;
import org.opends.server.replication.service.ReplicationBroker;
import org.opends.server.types.*;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static org.opends.server.TestCaseUtils.*;
/**
 * Stress test for the synchronization code using the ReplicationBroker API.
 */
@SuppressWarnings("javadoc")
public class StressTest extends ReplicationTestCase
{
  private static final String REPLICATION_STRESS_TEST =
@@ -175,6 +164,7 @@
   * @throws Exception
   *           If the environment could not be set up.
   */
  @Override
  @BeforeClass
  public void setUp() throws Exception
  {
@@ -192,10 +182,7 @@
        + "entryUUID: 11111111-1111-1111-1111-111111111111\n";
    TestCaseUtils.addEntry(topEntry);
    // find  a free port for the replicationServer
    ServerSocket socket = TestCaseUtils.bindFreePort();
    replServerPort = socket.getLocalPort();
    socket.close();
    replServerPort = TestCaseUtils.findFreePort();
    // Change log
    String replServerLdif =
@@ -245,7 +232,6 @@
    /**
     * Creates a new Stress Test Reader
     * @param count
     */
    public BrokerWriter(int count)
    {
@@ -284,7 +270,6 @@
    /**
     * Creates a new Stress Test Reader
     * @param broker
     */
    public BrokerReader(ReplicationBroker broker)
    {