From 530c736a46caa31efac5c6be33a0c429eb8fb2a7 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Thu, 22 Oct 2009 16:17:09 +0000
Subject: [PATCH] Remove useless MultimasterReplication plugin from unit tests
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/DependencyTest.java | 32 ++++----------------------------
1 files changed, 4 insertions(+), 28 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/DependencyTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/DependencyTest.java
index 79ef965..8713e99 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/DependencyTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/DependencyTest.java
@@ -92,7 +92,6 @@
ReplicationServer replServer = null;
LDAPReplicationDomain domain = null;
DN baseDn = DN.decode(TEST_ROOT_DN_STRING);
- SynchronizationProvider replicationPlugin = null;
int brokerId = 2;
int serverId = 1;
int replServerId = 81;
@@ -127,8 +126,6 @@
int replServerPort = socket.getLocalPort();
socket.close();
- replicationPlugin = new MultimasterReplication();
- DirectoryServer.registerSynchronizationProvider(replicationPlugin);
ReplServerFakeConfiguration conf =
new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModDelDependencyTestDb",
0, replServerId, 0,
@@ -174,7 +171,7 @@
domainConf.setHeartbeatInterval(100000);
domain = MultimasterReplication.createNewDomain(domainConf);
- replicationPlugin.completeSynchronizationProvider();
+ domain.start();
// check that last entry in sequence got added.
Entry lastEntry = getEntry(DN.decode(addDn), 30000, true);
@@ -239,9 +236,6 @@
if (domain != null)
MultimasterReplication.deleteDomain(baseDn);
-
- if (replicationPlugin != null)
- DirectoryServer.deregisterSynchronizationProvider(replicationPlugin);
}
}
@@ -257,7 +251,6 @@
ReplicationServer replServer = null;
LDAPReplicationDomain domain = null;
DN baseDn = DN.decode(TEST_ROOT_DN_STRING);
- SynchronizationProvider replicationPlugin = null;
int brokerId = 2;
int serverId = 1;
int replServerId = 82;
@@ -284,8 +277,6 @@
int replServerPort = socket.getLocalPort();
socket.close();
- replicationPlugin = new MultimasterReplication();
- DirectoryServer.registerSynchronizationProvider(replicationPlugin);
ReplServerFakeConfiguration conf =
new ReplServerFakeConfiguration(replServerPort, "dependencyTestModdnDelDependencyTestDb",
0, replServerId, 0,
@@ -301,7 +292,7 @@
Thread.sleep(2000);
domain = MultimasterReplication.createNewDomain(domainConf);
- replicationPlugin.completeSynchronizationProvider();
+ domain.start();
ReplicationBroker broker =
openReplicationSession(baseDn, brokerId, 1000, replServerPort, 1000,
@@ -364,9 +355,6 @@
if (domain != null)
MultimasterReplication.deleteDomain(baseDn);
-
- if (replicationPlugin != null)
- DirectoryServer.deregisterSynchronizationProvider(replicationPlugin);
}
}
@@ -415,7 +403,6 @@
ReplicationServer replServer = null;
LDAPReplicationDomain domain = null;
DN baseDn = DN.decode(TEST_ROOT_DN_STRING);
- SynchronizationProvider replicationPlugin = null;
int brokerId = 2;
int serverId = 1;
int replServerId = 83;
@@ -437,8 +424,6 @@
int replServerPort = socket.getLocalPort();
socket.close();
- replicationPlugin = new MultimasterReplication();
- DirectoryServer.registerSynchronizationProvider(replicationPlugin);
ReplServerFakeConfiguration conf =
new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddDelAddDependencyTestDb", 0,
replServerId,
@@ -491,7 +476,7 @@
new DomainFakeCfg(baseDn, serverId, replServers);
domain = MultimasterReplication.createNewDomain(domainConf);
- replicationPlugin.completeSynchronizationProvider();
+ domain.start();
// check that all entries have been deleted and added
// again by checking that they do have the correct entryuuid
@@ -531,9 +516,6 @@
if (domain != null)
MultimasterReplication.deleteDomain(baseDn);
-
- if (replicationPlugin != null)
- DirectoryServer.deregisterSynchronizationProvider(replicationPlugin);
}
}
@@ -548,7 +530,6 @@
ReplicationServer replServer = null;
LDAPReplicationDomain domain = null;
DN baseDn = DN.decode(TEST_ROOT_DN_STRING);
- SynchronizationProvider replicationPlugin = null;
int brokerId = 2;
int serverId = 1;
int replServerId = 84;
@@ -571,8 +552,6 @@
int replServerPort = socket.getLocalPort();
socket.close();
- replicationPlugin = new MultimasterReplication();
- DirectoryServer.registerSynchronizationProvider(replicationPlugin);
ReplServerFakeConfiguration conf =
new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModdnDependencyTestDb", 0,
replServerId,
@@ -617,7 +596,7 @@
new DomainFakeCfg(baseDn, serverId, replServers);
domain = MultimasterReplication.createNewDomain(domainConf);
- replicationPlugin.completeSynchronizationProvider();
+ domain.start();
// check that all entries have been renamed
for (sequence = 1; sequence<=AddSequenceLength; sequence ++)
@@ -646,9 +625,6 @@
if (domain != null)
MultimasterReplication.deleteDomain(baseDn);
-
- if (replicationPlugin != null)
- DirectoryServer.deregisterSynchronizationProvider(replicationPlugin);
}
}
--
Gitblit v1.10.0