Search in sources :

Example 86 with After

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

the class ConcurrentAddNodesClusterIT method after.

@After
public void after() throws Exception {
    workers.clear();
    for (Repository repo : repos) {
        dispose(repo);
    }
    repos.clear();
    for (DocumentMK mk : mks) {
        mk.dispose();
    }
    mks.clear();
    dropDB();
}
Also used : Repository(javax.jcr.Repository) DocumentMK(org.apache.jackrabbit.oak.plugins.document.DocumentMK) After(org.junit.After)

Example 87 with After

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

the class CopyTest method tearDown.

@After
public void tearDown() throws RepositoryException {
    Session s = testNode.getSession();
    s.removeItem(TEST_PATH);
    s.save();
}
Also used : Session(javax.jcr.Session) After(org.junit.After)

Example 88 with After

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

the class ConcurrentAddReferenceTest method tearDown.

@After
public void tearDown() throws RepositoryException {
    Session session = getAdminSession();
    testRoot.remove();
    session.removeItem(refPath);
    session.save();
}
Also used : Session(javax.jcr.Session) After(org.junit.After)

Example 89 with After

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

the class ReadVersionContentTest method tearDown.

@Override
@After
protected void tearDown() throws Exception {
    JackrabbitAccessControlList acl = AccessControlUtils.getAccessControlList(superuser, VersionConstants.VERSION_STORE_PATH);
    if (acl != null) {
        for (AccessControlEntry entry : acl.getAccessControlEntries()) {
            if (entry.getPrincipal().equals(testUser.getPrincipal())) {
                acl.removeAccessControlEntry(entry);
            }
        }
        acMgr.setPolicy(VersionConstants.VERSION_STORE_PATH, acl);
        superuser.save();
    }
}
Also used : AccessControlEntry(javax.jcr.security.AccessControlEntry) JackrabbitAccessControlList(org.apache.jackrabbit.api.security.JackrabbitAccessControlList) After(org.junit.After)

Example 90 with After

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

the class FeaturesServiceImplTest method after.

@After
public void after() throws Exception {
    Field field = URL.class.getDeclaredField("factory");
    field.setAccessible(true);
    field.set(null, null);
}
Also used : Field(java.lang.reflect.Field) 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