Improve error message when querying the External Changelog with an invalid cookie. Improve unit tests reliabililty for replication.
| | |
| | | SEVERE_ERR_REPLICATION_PROTOCOL_MESSAGE_TYPE_157=Replication \ |
| | | protocol error. Bad message type. %s received, %s required |
| | | SEVERE_ERR_RESYNC_REQUIRED_MISSING_DOMAIN_IN_PROVIDED_COOKIE_158=Full resync \ |
| | | required. Reason: The provided cookie is missing the replicated domain(s) %s |
| | | required because the provided cookie is missing the replicated domain(s) %s. \ |
| | | The following cookie value can be used to retrieve the missing changes, \ |
| | | including the COMPLETE record of changes for the missing domain(s) : %s |
| | | SEVERE_ERR_BYTE_COUNT_159=The Server Handler byte count is not correct (Fixed) |
| | | NOTICE_ERR_FRACTIONAL_CONFIG_UNKNOWN_OBJECT_CLASS_160=Wrong fractional \ |
| | | replication configuration: could not find object class definition for %s in \ |
| | |
| | | // the request is rejected and a full resync is required. |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | ERR_RESYNC_REQUIRED_MISSING_DOMAIN_IN_PROVIDED_COOKIE.get( |
| | | missingDomains + |
| | | ". Possible cookie: <" + (providedCookie + missingDomains)+ ">")); |
| | | missingDomains, |
| | | "<" + (providedCookie + missingDomains)+ ">")); |
| | | } |
| | | |
| | | domainCtxts = tmpSet.toArray(new DomainContext[0]); |
| | |
| | | |
| | | waitOpResult(searchOp, ResultCode.UNWILLING_TO_PERFORM); |
| | | assertEquals(searchOp.getSearchEntries().size(), 0); |
| | | assertTrue(searchOp.getErrorMessage().toString().equalsIgnoreCase( |
| | | "Full resync required. Reason: The provided cookie is missing the replicated domain(s) o=test:;. Possible cookie: <" |
| | | + newCookie + "o=test:;>"), "Server output:" + |
| | | String expectedError = |
| | | "Full resync required because the provided cookie is missing the replicated domain(s) o=test:;. The following cookie value can be used to retrieve the missing changes, including the COMPLETE record of changes for the missing domain(s) : <" |
| | | + newCookie + "o=test:;>"; |
| | | assertTrue(searchOp.getErrorMessage().toString().equalsIgnoreCase(expectedError), |
| | | "Expected: " + expectedError + "Server output:" + |
| | | searchOp.getErrorMessage().toString()); |
| | | |
| | | s1test.stop(); |
| | | s1test2.stop(); |
| | | s2test.stop(); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.replication; |
| | | |
| | |
| | | |
| | | int waitCo=0; |
| | | LDAPReplicationDomain doToco=null; |
| | | while(waitCo<30) |
| | | while(waitCo<50) |
| | | { |
| | | doToco = |
| | | LDAPReplicationDomain.retrievesReplicationDomain(baseDn); |
| | | if ((doToco!=null) && (doToco.isConnected())) |
| | | break; |
| | | Thread.sleep(200); |
| | | Thread.sleep(waitCo * 200); |
| | | waitCo++; |
| | | } |
| | | assertTrue(doToco.isConnected(), "not connected after #attempt="+waitCo); |