Search in sources :

Example 41 with After

use of org.junit.After in project sonarqube by SonarSource.

the class FileSystemMediumTest method stop.

@After
public void stop() {
    tester.stop();
    logs = new LogOutputRecorder();
}
Also used : LogOutputRecorder(org.sonar.scanner.mediumtest.LogOutputRecorder) After(org.junit.After)

Example 42 with After

use of org.junit.After in project qi4j-sdk by Qi4j.

the class TestApplication method concludeTests.

@After
public void concludeTests() {
    UnitOfWork uow = module.currentUnitOfWork();
    if (uow != null) {
        uow.discard();
    }
    if (module.isUnitOfWorkActive()) {
        while (module.isUnitOfWorkActive()) {
            uow = module.currentUnitOfWork();
            if (uow.isOpen()) {
                System.err.println("UnitOfWork not cleaned up:" + uow.usecase().name());
                uow.discard();
            } else {
                throw new InternalError("I have seen a case where a UoW is on the stack, but not opened. First is: " + uow.usecase().name());
            }
        }
        new Exception("UnitOfWork not properly cleaned up").printStackTrace();
    }
}
Also used : UnitOfWork(org.qi4j.api.unitofwork.UnitOfWork) ExpectedException(org.qi4j.sample.dcicargo.sample_b.infrastructure.testing.ExpectedException) After(org.junit.After)

Example 43 with After

use of org.junit.After in project neo4j by neo4j.

the class IdGeneratorRebuildFailureEmulationTest method verifyAndDispose.

@After
public void verifyAndDispose() throws Exception {
    GraphDatabaseService graphdb = null;
    try {
        graphdb = new Database(storeDir);
        verifyData(graphdb);
    } finally {
        if (graphdb != null) {
            graphdb.shutdown();
        }
        if (fs != null) {
            fs.disposeAndAssertNoOpenFiles();
        }
        fs = null;
    }
}
Also used : GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) ImpermanentGraphDatabase(org.neo4j.test.ImpermanentGraphDatabase) After(org.junit.After)

Example 44 with After

use of org.junit.After in project druid by druid-io.

the class KafkaIndexTaskTest method tearDown.

@After
public void tearDown() throws Exception {
    emitter.close();
    synchronized (runningTasks) {
        for (Task task : runningTasks) {
            task.stopGracefully();
        }
        runningTasks.clear();
    }
    taskExec.shutdown();
    taskExec.awaitTermination(9999, TimeUnit.DAYS);
    kafkaServer.close();
    kafkaServer = null;
    zkServer.stop();
    zkServer = null;
    destroyToolboxFactory();
}
Also used : Task(io.druid.indexing.common.task.Task) After(org.junit.After)

Example 45 with After

use of org.junit.After in project che by eclipse.

the class RenameNonPrivateFieldTest method tearDown.

@After
public void tearDown() throws Exception {
    super.tearDown();
    setup.tearDown();
    Hashtable options = JavaCore.getOptions();
    options.put(JavaCore.CODEASSIST_FIELD_PREFIXES, fPrefixPref);
    JavaCore.setOptions(options);
}
Also used : Hashtable(java.util.Hashtable) 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