From 585d35b94a797fa403ad080c4bffec73b910eee6 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 10 Oct 2013 08:56:38 +0000
Subject: [PATCH] *Test*.java: Code cleanup. Used InternalClientConnection.process*() methods.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java
index f1ab201..8f49cf2 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java
@@ -41,7 +41,6 @@
 import org.opends.server.api.SynchronizationProvider;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.core.ModifyOperation;
-import org.opends.server.core.ModifyOperationBasis;
 import org.opends.server.protocols.internal.InternalClientConnection;
 import org.opends.server.replication.common.CSNGenerator;
 import org.opends.server.replication.plugin.EntryHistorical;
@@ -68,9 +67,6 @@
 
   /**
    * Set up the environment for performing the tests in this Class.
-   *
-   * @throws Exception
-   *           If the environment could not be set up.
    */
   @Override
   @BeforeClass
@@ -133,12 +129,7 @@
       List<Modification> mods = new ArrayList<Modification>();
       Modification mod = new Modification(ModificationType.ADD, attr);
       mods.add(mod);
-      ModifyOperationBasis modOp = new ModifyOperationBasis(connection,
-          InternalClientConnection.nextOperationID(), InternalClientConnection
-          .nextMessageID(), null, baseDN, mods);
-      modOp.setInternalOperation(true);
-      modOp.run();
-
+      ModifyOperation modOp = connection.processModify(baseDN, mods);
       assertEquals(modOp.getResultCode(), ResultCode.SUCCESS,
           "The original operation failed");
 
@@ -167,12 +158,7 @@
       mod = new Modification(ModificationType.DELETE, attr);
       mods.clear();
       mods.add(mod);
-      modOp = new ModifyOperationBasis(connection,
-          InternalClientConnection.nextOperationID(), InternalClientConnection
-          .nextMessageID(), null, baseDN, mods);
-      modOp.setInternalOperation(true);
-      modOp.run();
-
+      modOp = connection.processModify(baseDN, mods);
       assertEquals(modOp.getResultCode(), ResultCode.SUCCESS,
           "The original operation failed");
 

--
Gitblit v1.10.0