| | |
| | | package org.opends.server.replication; |
| | | |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.server.TestCaseUtils.TEST_ROOT_DN_STRING; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.replication.protocol.OperationContext.SYNCHROCONTEXT; |
| | | import static org.opends.server.util.StaticUtils.createEntry; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | import static org.testng.Assert.assertEquals; |
| | | import static org.testng.Assert.assertNotNull; |
| | | import static org.testng.Assert.assertTrue; |
| | | import static org.testng.Assert.fail; |
| | | import static org.opends.server.TestCaseUtils.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.replication.protocol.OperationContext.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.ByteArrayOutputStream; |
| | |
| | | import org.opends.server.replication.service.ReplicationBroker; |
| | | import org.opends.server.tools.LDAPSearch; |
| | | import org.opends.server.tools.LDAPWriter; |
| | | import org.opends.server.types.AbstractOperation; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeBuilder; |
| | | import org.opends.server.types.AttributeValue; |
| | |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.Operation; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | |
| | | * |
| | | * @throws Exception If the environment could not be set up. |
| | | */ |
| | | @Override |
| | | @AfterClass |
| | | |
| | | public void classCleanUp() throws Exception |
| | | { |
| | | callParanoiaCheck = false; |
| | |
| | | assertEquals(searchOp.getSearchEntries().size(), 1); |
| | | if (entries != null) |
| | | { |
| | | int i=0; |
| | | for (SearchResultEntry resultEntry : entries) |
| | | { |
| | | i++; |
| | | debugInfo(tn, "Result entry returned:" + resultEntry.toLDIFString()); |
| | | ldifWriter.writeEntry(resultEntry); |
| | | // check the entry has the right content |
| | |
| | | assertEquals(searchOp.getSearchEntries().size(), 1); |
| | | if (entries != null) |
| | | { |
| | | int i=0; |
| | | for (SearchResultEntry resultEntry : entries) |
| | | { |
| | | i++; |
| | | // Just verify that no entry contains the ChangeLogCookie control |
| | | List<Control> controls = resultEntry.getControls(); |
| | | assertTrue(controls.isEmpty()); |
| | |
| | | lastDraftChangeNumber-firstDraftChangeNumber+1); |
| | | if (searchOp.getSearchEntries() != null) |
| | | { |
| | | int i=0; |
| | | for (SearchResultEntry resultEntry : searchOp.getSearchEntries()) |
| | | { |
| | | i++; |
| | | debugInfo(tn, "Result entry returned:" + resultEntry.toLDIFString()); |
| | | } |
| | | } |
| | |
| | | assertEquals(searchOp.getSearchEntries().size(), 1); |
| | | if (entries != null) |
| | | { |
| | | int i=0; |
| | | for (SearchResultEntry resultEntry : entries) |
| | | { |
| | | i++; |
| | | debugInfo(tn, "Result entry returned:" + resultEntry.toLDIFString()); |
| | | ldifWriter.writeEntry(resultEntry); |
| | | // check the DEL entry has the right content |
| | |
| | | assertEquals(searchOp.getSearchEntries().size(), 1); |
| | | if (entries != null) |
| | | { |
| | | int i=0; |
| | | for (SearchResultEntry resultEntry : entries) |
| | | { |
| | | i++; |
| | | debugInfo(tn, "Result entry returned:" + resultEntry.toLDIFString()); |
| | | ldifWriter.writeEntry(resultEntry); |
| | | if (eclEnabled) |
| | |
| | | debugInfo(tn, "Perfs - last 3 changes searched in (ms):" + (t5 - t4)); |
| | | if (searchOp.getSearchEntries() != null) |
| | | { |
| | | int i=0; |
| | | for (SearchResultEntry resultEntry : searchOp.getSearchEntries()) |
| | | { |
| | | i++; |
| | | debugInfo(tn, "Result entry returned:" + resultEntry.toLDIFString()); |
| | | } |
| | | } |
| | |
| | | return targetEntry; |
| | | } |
| | | |
| | | private void waitOpResult(AbstractOperation operation, |
| | | ResultCode expectedResult) |
| | | private void waitOpResult(Operation operation, ResultCode expectedResult) |
| | | { |
| | | int ii=0; |
| | | while((operation.getResultCode()==ResultCode.UNDEFINED) || |