| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication; |
| | | |
| | | import static org.opends.server.TestCaseUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.util.LinkedList; |
| | |
| | | import org.opends.server.replication.server.ReplServerFakeConfiguration; |
| | | import org.opends.server.replication.server.ReplicationServer; |
| | | import org.opends.server.replication.service.ReplicationBroker; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.Attributes; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import static org.opends.server.TestCaseUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** |
| | | * Test that the dependencies are computed correctly when replaying |
| | | * sequences of operations that requires to follow a given order |
| | |
| | | { |
| | | TEST_ROOT_DN = DN.decode(TEST_ROOT_DN_STRING); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Check that a sequence of dependents adds and mods is correctly ordered: |
| | | * Using a deep dit : |
| | |
| | | |
| | | ReplServerFakeConfiguration conf = |
| | | new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModDelDependencyTestDb", |
| | | 0, replServerId, 0, |
| | | AddSequenceLength*5+100, null); |
| | | replicationDbImplementation, 0, replServerId, |
| | | 0, AddSequenceLength*5+100, null); |
| | | replServer = new ReplicationServer(conf); |
| | | |
| | | ReplicationBroker broker = openReplicationSession( |
| | |
| | | |
| | | ReplServerFakeConfiguration conf = |
| | | new ReplServerFakeConfiguration(replServerPort, "dependencyTestModdnDelDependencyTestDb", |
| | | 0, replServerId, 0, |
| | | 200, null); |
| | | replicationDbImplementation, 0, replServerId, |
| | | 0, 200, null); |
| | | replServer = new ReplicationServer(conf); |
| | | |
| | | // configure and start replication of TEST_ROOT_DN_STRING on the server |
| | |
| | | int replServerPort = TestCaseUtils.findFreePort(); |
| | | |
| | | ReplServerFakeConfiguration conf = |
| | | new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddDelAddDependencyTestDb", 0, |
| | | replServerId, |
| | | 0, 5*AddSequenceLength+100, null); |
| | | new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddDelAddDependencyTestDb", replicationDbImplementation, |
| | | 0, replServerId, 0, 5*AddSequenceLength+100, null); |
| | | replServer = new ReplicationServer(conf); |
| | | |
| | | ReplicationBroker broker = openReplicationSession( |
| | |
| | | int replServerPort = TestCaseUtils.findFreePort(); |
| | | |
| | | ReplServerFakeConfiguration conf = |
| | | new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModdnDependencyTestDb", 0, |
| | | replServerId, |
| | | 0, 5*AddSequenceLength+100, null); |
| | | new ReplServerFakeConfiguration(replServerPort, "dependencyTestAddModdnDependencyTestDb", replicationDbImplementation, |
| | | 0, replServerId, 0, 5*AddSequenceLength+100, null); |
| | | replServer = new ReplicationServer(conf); |
| | | |
| | | ReplicationBroker broker = openReplicationSession( |