From 422cba8af9837ba20b11a46a6e8a172e3b5a7558 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Fri, 16 Oct 2009 06:41:58 +0000
Subject: [PATCH] Fix for 4272 : Changes not replayed initially on adde

---
 opends/src/server/org/opends/server/replication/server/ReplicationServer.java |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServer.java b/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
index c093c86..b24c5e5 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -1503,6 +1503,34 @@
   }
 
   /**
+   * WARNING : only use this methods for tests purpose.
+   *
+   * Add the Replication Server given as a parameter in the list
+   * of local replication servers.
+   *
+   * @param server The server to be added.
+   */
+  public static void onlyForTestsAddlocalReplicationServer(String server)
+  {
+    int separator = server.lastIndexOf(':');
+    if (separator == -1)
+      return ;
+    int port = Integer.parseInt(server.substring(separator + 1));
+    localPorts.add(port);
+  }
+
+  /**
+   * WARNING : only use this methods for tests purpose.
+   *
+   * Clear the list of local Replication Servers
+   *
+   */
+  public static void onlyForTestsClearLocalReplicationServerList()
+  {
+    localPorts.clear();
+  }
+
+  /**
    * This method allows to check if the Replication Server given
    * as the parameter is running in the local JVM.
    *

--
Gitblit v1.10.0