Search in sources :

Example 91 with After

use of org.junit.After in project jackrabbit-oak by apache.

the class AsyncIndexUpdateTest method shutDown.

@After
public void shutDown() {
    statsProvider.close();
    new ExecutorCloser(executor).close();
}
Also used : ExecutorCloser(org.apache.jackrabbit.oak.commons.concurrent.ExecutorCloser) After(org.junit.After)

Example 92 with After

use of org.junit.After in project jackrabbit-oak by apache.

the class Jr2CompatibilityTest method after.

@Override
@After
public void after() throws Exception {
    try {
        AccessControlManager acMgr = getAccessControlManager(root);
        JackrabbitAccessControlList acl = AccessControlUtils.getAccessControlList(acMgr, "/");
        if (acl != null) {
            boolean modified = false;
            for (AccessControlEntry entry : acl.getAccessControlEntries()) {
                if (entry.getPrincipal().equals(getTestUser().getPrincipal())) {
                    acl.removeAccessControlEntry(entry);
                    modified = true;
                }
            }
            if (modified) {
                acMgr.setPolicy("/", acl);
                root.commit();
            }
        }
    } finally {
        super.after();
    }
}
Also used : AccessControlManager(javax.jcr.security.AccessControlManager) AccessControlEntry(javax.jcr.security.AccessControlEntry) JackrabbitAccessControlList(org.apache.jackrabbit.api.security.JackrabbitAccessControlList) After(org.junit.After)

Example 93 with After

use of org.junit.After in project jackrabbit-oak by apache.

the class LucenePropertyIndexTest method after.

@After
public void after() {
    new ExecutorCloser(executorService).close();
    IndexDefinition.setDisableStoredIndexDefinition(false);
}
Also used : ExecutorCloser(org.apache.jackrabbit.oak.commons.concurrent.ExecutorCloser) After(org.junit.After)

Example 94 with After

use of org.junit.After in project geode by apache.

the class JtaNoninvolvementJUnitTest method after.

@After
public void after() {
    closeCache();
    InternalDistributedSystem ids = InternalDistributedSystem.getAnyInstance();
    if (ids != null) {
        ids.disconnect();
    }
}
Also used : InternalDistributedSystem(org.apache.geode.distributed.internal.InternalDistributedSystem) After(org.junit.After)

Example 95 with After

use of org.junit.After in project geode by apache.

the class QueryObserverCallbackJUnitTest method tearDown.

@After
public void tearDown() throws Exception {
    CacheUtils.closeCache();
    IndexManager indexManager = ((LocalRegion) region).getIndexManager();
    if (indexManager != null)
        indexManager.destroy();
}
Also used : IndexManager(org.apache.geode.cache.query.internal.index.IndexManager) LocalRegion(org.apache.geode.internal.cache.LocalRegion) After(org.junit.After)

Aggregations

After (org.junit.After)1427 File (java.io.File)284 Before (org.junit.Before)137 Test (org.junit.Test)127 List (java.util.List)87 IOException (java.io.IOException)83 Assert (org.junit.Assert)70 Collectors (java.util.stream.Collectors)67 ArrayList (java.util.ArrayList)64 Map (java.util.Map)62 Assert.assertEquals (org.junit.Assert.assertEquals)60 Arrays (java.util.Arrays)56 Collections (java.util.Collections)56 Assert.assertTrue (org.junit.Assert.assertTrue)54 HashMap (java.util.HashMap)53 Rule (org.junit.Rule)50 HashSet (java.util.HashSet)44 Set (java.util.Set)42 UUID (java.util.UUID)42 TimeUnit (java.util.concurrent.TimeUnit)41