| | |
| | | */ |
| | | package org.opends.server.replication; |
| | | |
| | | import static java.util.concurrent.TimeUnit.*; |
| | | |
| | | import static org.forgerock.opendj.ldap.ModificationType.*; |
| | | import static org.forgerock.opendj.ldap.ResultCode.*; |
| | | import static org.forgerock.opendj.ldap.SearchScope.*; |
| | | import static org.opends.server.backends.task.TaskState.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.protocols.internal.Requests.*; |
| | | import static org.opends.server.util.CollectionUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collection; |
| | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import static java.util.concurrent.TimeUnit.*; |
| | | |
| | | import static org.forgerock.opendj.ldap.ModificationType.*; |
| | | import static org.forgerock.opendj.ldap.ResultCode.*; |
| | | import static org.forgerock.opendj.ldap.SearchScope.*; |
| | | import static org.opends.server.backends.task.TaskState.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.protocols.internal.Requests.*; |
| | | import static org.opends.server.util.CollectionUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** An abstract class that all Replication unit test should extend. */ |
| | | @SuppressWarnings("javadoc") |
| | | @Test(groups = { "precommit", "replication" }, sequential = true) |
| | |
| | | { |
| | | final Entry newEntry = DirectoryServer.getEntry(dn); |
| | | assertNotNull(newEntry); |
| | | List<Attribute> attrList = newEntry.getAllAttributes(attrTypeStr); |
| | | Assertions.assertThat(attrList).isNotEmpty(); |
| | | Attribute attr = attrList.get(0); |
| | | Iterable<Attribute> attrs = newEntry.getAllAttributes(attrTypeStr); |
| | | Assertions.assertThat(attrs).isNotEmpty(); |
| | | Attribute attr = attrs.iterator().next(); |
| | | boolean foundAttributeValue = attr.contains(ByteString.valueOfUtf8(valueString)); |
| | | assertEquals(foundAttributeValue, expectedAttributeValueFound, foundMsg); |
| | | return null; |
| | |
| | | { |
| | | Entry newEntry = DirectoryServer.getEntry(dn); |
| | | assertNotNull(newEntry); |
| | | Attribute attribute = newEntry.getAllAttributes("entryuuid").get(0); |
| | | String found = attribute.iterator().next().toString(); |
| | | Attribute attribute = newEntry.getAllAttributes("entryuuid").iterator().next(); |
| | | ByteString found = attribute.iterator().next(); |
| | | assertNotNull(found, "Entry: " + dn + " Could not be found."); |
| | | return found; |
| | | return found.toString(); |
| | | } |
| | | }); |
| | | } |