| | |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.Callable; |
| | | |
| | | import org.assertj.core.api.Assertions; |
| | | import org.assertj.core.api.SoftAssertions; |
| | |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.util.TestTimer; |
| | | import org.opends.server.util.TestTimer.CallableVoid; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | |
| | | .maxSleep(1, MINUTES) |
| | | .sleepTimes(200, MILLISECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new Callable<Void>() |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public Void call() throws Exception |
| | | public void call() throws Exception |
| | | { |
| | | LDAPReplicationDomain doToco = LDAPReplicationDomain.retrievesReplicationDomain(baseDN); |
| | | assertNotNull(doToco); |
| | | assertTrue(doToco.isConnected(), "not connected"); |
| | | debugInfo("ReplicationDomain: Import/Export is running ? " + doToco.ieRunning()); |
| | | return null; |
| | | } |
| | | }); |
| | | } |
| | |
| | | .maxSleep(10, SECONDS) |
| | | .sleepTimes(100, MILLISECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new Callable<Void>() |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public Void call() throws Exception |
| | | public void call() throws Exception |
| | | { |
| | | assertNull(LDAPReplicationDomain.retrievesReplicationDomain(baseDN)); |
| | | return null; |
| | | } |
| | | }); |
| | | } |
| | |
| | | .maxSleep(timeout, MILLISECONDS) |
| | | .sleepTimes(50, MILLISECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new Callable<Void>() |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public Void call() throws Exception |
| | | public void call() throws Exception |
| | | { |
| | | LDAPReplicationDomain domain = MultimasterReplication.findDomain(baseDN, null); |
| | | assertNotNull(domain); |
| | | assertTrue(domain.isConnected(), "server should have been connected to replication domain" + baseDN); |
| | | return null; |
| | | } |
| | | }); |
| | | } |
| | |
| | | .maxSleep(10, SECONDS) |
| | | .sleepTimes(100, MILLISECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new Callable<Void>() |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public Void call() throws Exception |
| | | public void call() throws Exception |
| | | { |
| | | assertGenIdEquals(expectedGenId); |
| | | return null; |
| | | } |
| | | }); |
| | | } |