| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.testng.annotations.AfterClass; |
| | | import org.testng.annotations.Test; |
| | | import static org.testng.Assert.*; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testContainsEntry() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testGetEntry1() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testGetEntry2() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testGetEntry3() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testGetEntryID() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testPutEntry() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testPutEntryIfAbsent() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testRemoveEntry() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testClear() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testClearBackend() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testClearSubtree() |
| | | throws Exception |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | @Override |
| | | public void testHandleLowMemory() |
| | | throws Exception |
| | | { |
| | | assertNull(super.cache.toVerboseString(), |
| | | "Expected empty cache. " + "Cache contents:\n" + |
| | | super.cache.toVerboseString()); |
| | | assertNull(super.toVerboseString(), |
| | | "Expected empty cache. " + "Cache contents:" + ServerConstants.EOL + |
| | | super.toVerboseString()); |
| | | |
| | | Backend b = DirectoryServer.getBackend(DN.decode("o=test")); |
| | | |
| | |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getDN()), "Not expected to find " + |
| | | super.testEntriesList.get(i).getDN().toString() + " in the " + |
| | | "cache. Cache contents:\n" + super.cache.toVerboseString()); |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | super.toVerboseString()); |
| | | } |
| | | |
| | | // Clear the cache so that other tests can start from scratch. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Test(enabled=false, groups="slow", |
| | | @Test(groups="slow", |
| | | threadPoolSize = 10, |
| | | invocationCount = 10, |
| | | timeOut = 60000) |
| | |
| | | /** |
| | | * Tests cache rotation on specific number of entries. |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test() |
| | | public void testCacheRotation() |
| | | throws Exception |
| | | { |
| | | assertNull(super.cache.toVerboseString(), |
| | | "Expected empty cache. " + "Cache contents:\n" + |
| | | super.cache.toVerboseString()); |
| | | assertNull(super.toVerboseString(), |
| | | "Expected empty cache. " + "Cache contents:" + ServerConstants.EOL + |
| | | super.toVerboseString()); |
| | | |
| | | Backend b = DirectoryServer.getBackend(DN.decode("o=test")); |
| | | |
| | |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getDN()), "Not expected to find " + |
| | | super.testEntriesList.get(i).getDN().toString() + " in the " + |
| | | "cache. Cache contents:\n" + super.cache.toVerboseString()); |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | super.toVerboseString()); |
| | | } |
| | | |
| | | // Make sure remaining NUMTESTENTRIES are still in the cache. |
| | |
| | | assertTrue(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getDN()), "Expected to find " + |
| | | super.testEntriesList.get(i).getDN().toString() + " in the " + |
| | | "cache. Cache contents:\n" + super.cache.toVerboseString()); |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | super.toVerboseString()); |
| | | } |
| | | |
| | | // Clear the cache so that other tests can start from scratch. |