Search in sources :

Example 11 with After

use of org.junit.After in project cas by apereo.

the class SearchModeSearchDatabaseAuthenticationHandlerTests method tearDown.

@After
public void tearDown() throws Exception {
    final Connection c = this.dataSource.getConnection();
    final Statement s = c.createStatement();
    c.setAutoCommit(true);
    for (int i = 0; i < 5; i++) {
        s.execute("delete from casusers;");
    }
    c.close();
}
Also used : Statement(java.sql.Statement) Connection(java.sql.Connection) After(org.junit.After)

Example 12 with After

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

the class TestLockManager method tearDown.

@After
public void tearDown() throws Exception {
    for (ProcedureInfo procInfo : getMasterProcedureExecutor().listProcedures()) {
        Procedure proc = getMasterProcedureExecutor().getProcedure(procInfo.getProcId());
        if (proc instanceof LockProcedure) {
            ((LockProcedure) proc).unlock(getMasterProcedureExecutor().getEnvironment());
            ProcedureTestingUtility.waitProcedure(getMasterProcedureExecutor(), proc);
        }
    }
    assertEquals(0, getMasterProcedureExecutor().getEnvironment().getProcedureScheduler().size());
}
Also used : TestLockProcedure(org.apache.hadoop.hbase.master.locking.TestLockProcedure) LockProcedure(org.apache.hadoop.hbase.master.locking.LockProcedure) ProcedureInfo(org.apache.hadoop.hbase.ProcedureInfo) TestLockProcedure(org.apache.hadoop.hbase.master.locking.TestLockProcedure) LockProcedure(org.apache.hadoop.hbase.master.locking.LockProcedure) Procedure(org.apache.hadoop.hbase.procedure2.Procedure) After(org.junit.After)

Example 13 with After

use of org.junit.After in project hibernate-orm by hibernate.

the class BaseEnversJPAFunctionalTestCase method releaseUnclosedEntityManagers.

@After
@SuppressWarnings({ "UnusedDeclaration" })
public void releaseUnclosedEntityManagers() {
    releaseUnclosedEntityManager(this.em);
    auditReader = null;
    for (EntityManager isolatedEm : isolatedEms) {
        releaseUnclosedEntityManager(isolatedEm);
    }
}
Also used : EntityManager(javax.persistence.EntityManager) After(org.junit.After)

Example 14 with After

use of org.junit.After in project head by mifos.

the class AccountRegenerateScheduleIntegrationTestCase method tearDown.

@After
public void tearDown() throws Exception {
    try {
        savingsBO = null;
        accountBO = null;
        client = null;
        group = null;
        center = null;
        //            savingsBO = null;
        //            accountBO = null;
        //            client = null;
        //            group = null;
        //            center = null;
        legacyAccountDao = null;
    } catch (Exception e) {
    // TODO Whoops, cleanup didnt work, reset db
    } finally {
        StaticHibernateUtil.flushSession();
    }
    new DateTimeService().resetToCurrentSystemDateTime();
}
Also used : DateTimeService(org.mifos.framework.util.DateTimeService) MeetingException(org.mifos.application.meeting.exceptions.MeetingException) After(org.junit.After)

Example 15 with After

use of org.junit.After in project head by mifos.

the class RepayLoanActionStrutsTest method tearDown.

@After
public void tearDown() throws Exception {
    new ConfigurationPersistence().updateConfigurationKeyValueInteger(LoanConstants.REPAYMENT_SCHEDULES_INDEPENDENT_OF_MEETING_IS_ENABLED, lsim);
    new DateTimeService().resetToCurrentSystemDateTime();
    accountBO = null;
    group = null;
    center = null;
}
Also used : ConfigurationPersistence(org.mifos.config.persistence.ConfigurationPersistence) DateTimeService(org.mifos.framework.util.DateTimeService) After(org.junit.After)

Aggregations

After (org.junit.After)1404 File (java.io.File)284 Before (org.junit.Before)137 Test (org.junit.Test)127 List (java.util.List)87 IOException (java.io.IOException)82 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