From 4bb3d3af3d032a98f2ca318c81be5c4f81034b8f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 11 Oct 2013 12:27:16 +0000
Subject: [PATCH] ReplicationBroker.java: In computeInitialServerStatus(), used early exits. In computeBestServerForWeight(), extracted methods computeBestServerWhenNotConnected() and computeBestServerWhenConnected(). Changed replicationServerUrls from Collection<String> to Set<String>. Removed useless field initialization to null. Renamed _publish() to publish() + reduced local variables scope. In receive(), renamed local variable replicationServerID to previousRsServerID and used this one more rather than the field. In changeConfig(), used Set.equals(). Changed getReplicationMonitor() to getReplicationMonitorInstanceName().
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
index 5f2b87b..6c0827f 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
@@ -236,7 +236,7 @@
private void connect(ReplicationBroker broker, int port, int timeout) throws Exception
{
- broker.start(Collections.singletonList("localhost:" + port));
+ broker.start(Collections.singleton("localhost:" + port));
// give some time to the broker to connect to the replicationServer.
checkConnection(30, broker, port);
--
Gitblit v1.10.0