| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | |
| | | import org.testng.annotations.Test; |
| | | import static org.testng.Assert.*; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.tasks.TaskUtils; |
| | | import static org.opends.server.util.ServerConstants.OC_TOP; |
| | | import static org.opends.server.util.ServerConstants.OC_EXTENSIBLE_OBJECT; |
| | |
| | | @DataProvider(name = "systemIndexes") |
| | | public Object[][] systemIndexes() { |
| | | return new Object[][] { |
| | | { "id2subtree" }, |
| | | { "id2children" }, |
| | | { "dn2id" }, |
| | | { "dn2uri" } |
| | | }; |
| | |
| | | return new Object[][] { |
| | | { "id2entry" }, |
| | | { "nonindex" }, |
| | | { "id2subtree" }, |
| | | { "id2children" }, |
| | | { "mail.nonindex" } |
| | | }; |
| | | } |
| | |
| | | } |
| | | |
| | | @Test |
| | | public void testRebuildDependentIndexes() throws Exception |
| | | public void testRebuildAll() throws Exception |
| | | { |
| | | cleanAndLoad(10); |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.setRebuildAll(true); |
| | | |
| | | be=(BackendImpl) DirectoryServer.getBackend(beID); |
| | | |
| | | TaskUtils.disableBackend(beID); |
| | | |
| | | be.rebuildBackend(rebuildConfig); |
| | | |
| | | assertEquals(verifyBackend(null), 0); |
| | | |
| | | TaskUtils.enableBackend(beID); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void testRebuildDN2ID() throws Exception |
| | | { |
| | | cleanAndLoad(10); |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex("dn2id"); |
| | | rebuildConfig.addRebuildIndex("id2children"); |
| | | |
| | | be=(BackendImpl) DirectoryServer.getBackend(beID); |
| | | |