| | |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.util.TestTimer; |
| | | import org.opends.server.util.TestTimer.CallableVoid; |
| | | import org.testng.annotations.AfterClass; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | |
| | | .maxSleep(secTimeout, SECONDS) |
| | | .sleepTimes(1, SECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new Callable<Void>() |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public Void call() throws Exception |
| | | public void call() throws Exception |
| | | { |
| | | if (rb.isConnected()) |
| | | { |
| | | logger.trace("checkConnection: connection of broker " + rb.getServerId() |
| | | + " to RS " + rb.getRsGroupId() + " obtained."); |
| | | return null; |
| | | return; |
| | | } |
| | | |
| | | rb.start(); |
| | | return null; |
| | | } |
| | | }); |
| | | } |
| | |
| | | .maxSleep(timeoutInSecs, 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 |
| | | { |
| | | final Entry newEntry = DirectoryServer.getEntry(dn); |
| | | assertNotNull(newEntry); |
| | |
| | | Attribute attr = attrs.iterator().next(); |
| | | boolean foundAttributeValue = attr.contains(ByteString.valueOfUtf8(valueString)); |
| | | assertEquals(foundAttributeValue, expectedAttributeValueFound, foundMsg); |
| | | return null; |
| | | } |
| | | }); |
| | | } |
| | |
| | | .maxSleep(timeoutInMillis, MILLISECONDS) |
| | | .sleepTimes(200, MILLISECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new Callable<Void>() |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public Void call() throws Exception |
| | | public void call() throws Exception |
| | | { |
| | | assertEquals(DirectoryServer.entryExists(dn), exist, "Expected entry with dn \"" + dn + "\" would exist"); |
| | | return null; |
| | | } |
| | | }); |
| | | |