| | |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.schema.DirectoryStringSyntax; |
| | | import org.opends.server.synchronization.plugin.MultimasterSynchronization; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | |
| | | // we do test something. |
| | | connection.processDelete(DN.decode("dc=foo, dc=example,dc=com")); |
| | | |
| | | MultimasterSynchronization.notificationBackupStart( |
| | | DN.decode("dc=example,dc=com")); // TEMPORARY UNTIL core server |
| | | // sends a notification |
| | | |
| | | task("dn: ds-task-id=" + UUID.randomUUID() |
| | | + ",cn=Scheduled Tasks,cn=Tasks\n" |
| | | + "objectclass: top\n" |
| | |
| | | addEntry("dn: dc=foo, dc=example,dc=com\n" |
| | | + "objectClass: top\n" + "objectClass: domain\n"); |
| | | |
| | | MultimasterSynchronization.notificationRestoreStart( |
| | | DN.decode("dc=example,dc=com"));// TEMPORARY UNTIL core server |
| | | // sends a notification |
| | | task("dn: ds-task-id=" + UUID.randomUUID() |
| | | + ",cn=Scheduled Tasks,cn=Tasks\n" |
| | | + "objectclass: top\n" |
| | |
| | | + "ds-backup-directory-path: bak" + File.separator |
| | | + "userRoot\n"); |
| | | |
| | | MultimasterSynchronization.notificationRestoreEnd( |
| | | DN.decode("dc=example,dc=com"));// TEMPORARY UNTIL core server |
| | | // sends a notification |
| | | |
| | | if (getEntry(DN.decode("dc=foo, dc=example,dc=com"), 30000, true) == null) |
| | | fail("The Directory has not been resynchronized after the restore."); |
| | | |
| | |
| | | // we do test something. |
| | | connection.processDelete(DN.decode("dc=foo, dc=example,dc=com")); |
| | | |
| | | MultimasterSynchronization.notificationBackupStart( |
| | | DN.decode("dc=example,dc=com")); // TEMPORARY UNTIL core server |
| | | // sends a notification |
| | | |
| | | String buildRoot = System.getProperty(TestCaseUtils.PROPERTY_BUILD_ROOT); |
| | | String path = buildRoot + File.separator + "build" + |
| | | File.separator + "unit-tests" + File.separator + |
| | |
| | | addEntry("dn: dc=foo, dc=example,dc=com\n" |
| | | + "objectClass: top\n" + "objectClass: domain\n"); |
| | | |
| | | MultimasterSynchronization.notificationRestoreStart( |
| | | DN.decode("dc=example,dc=com"));// TEMPORARY UNTIL core server |
| | | // sends a notification |
| | | task("dn: ds-task-id=" + UUID.randomUUID() |
| | | + ",cn=Scheduled Tasks,cn=Tasks\n" |
| | | + "objectclass: top\n" |
| | |
| | | + "ds-task-import-ldif-file: " + path + "\n" |
| | | + "ds-task-import-reject-file: " + path + "reject\n"); |
| | | |
| | | MultimasterSynchronization.notificationRestoreEnd( |
| | | DN.decode("dc=example,dc=com"));// TEMPORARY UNTIL core server |
| | | // sends a notification |
| | | |
| | | if (getEntry(DN.decode("dc=foo, dc=example,dc=com"), 30000, true) == null) |
| | | fail("The Directory has not been resynchronized after the restore."); |
| | | } |