Search in sources :

Example 56 with After

use of org.junit.After in project voltdb by VoltDB.

the class TestCSVLoader method tearDown.

@After
public void tearDown() throws IOException, ProcCallException {
    final ClientResponse response = client.callProcedure("@AdHoc", "TRUNCATE TABLE BLAH;");
    assertEquals(ClientResponse.SUCCESS, response.getStatus());
}
Also used : ClientResponse(org.voltdb.client.ClientResponse) After(org.junit.After)

Example 57 with After

use of org.junit.After in project EnrichmentMapApp by BaderLab.

the class LegacySessionLoadTest method resetManager.

@After
public void resetManager() {
    // Don't save the model on shutdown, we want to do that in a test
    EnrichmentMapManager emManager = injector.getInstance(EnrichmentMapManager.class);
    emManager.reset();
}
Also used : EnrichmentMapManager(org.baderlab.csplugins.enrichmentmap.model.EnrichmentMapManager) After(org.junit.After)

Example 58 with After

use of org.junit.After in project intellij-community by JetBrains.

the class SvnTestCase method imitUpdate.

protected static void imitUpdate(final Project project) {
    ProjectLevelVcsManagerEx.getInstanceEx(project).getOptions(VcsConfiguration.StandardOption.UPDATE).setValue(false);
    final CommonUpdateProjectAction action = new CommonUpdateProjectAction();
    action.getTemplatePresentation().setText("1");
    action.actionPerformed(new AnActionEvent(null, dataId -> {
        if (CommonDataKeys.PROJECT.is(dataId)) {
            return project;
        }
        return null;
    }, "test", new Presentation(), ActionManager.getInstance(), 0));
    final ChangeListManager clManager = ChangeListManager.getInstance(project);
    clManager.ensureUpToDate(false);
    // wait for after-events like annotations recalculation
    clManager.ensureUpToDate(false);
    // zipper updater
    sleep(100);
}
Also used : UIUtil(com.intellij.util.ui.UIUtil) PluginPathManager(com.intellij.openapi.application.PluginPathManager) VirtualFile(com.intellij.openapi.vfs.VirtualFile) com.intellij.openapi.vcs.changes(com.intellij.openapi.vcs.changes) Presentation(com.intellij.openapi.actionSystem.Presentation) VirtualFileManager(com.intellij.openapi.vfs.VirtualFileManager) StartupManagerImpl(com.intellij.ide.startup.impl.StartupManagerImpl) MockChangelistBuilder(com.intellij.testFramework.vcs.MockChangelistBuilder) Semaphore(com.intellij.util.concurrency.Semaphore) After(org.junit.After) ProjectLevelVcsManagerEx(com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx) Messages(com.intellij.openapi.ui.Messages) SvnVcs(org.jetbrains.idea.svn.SvnVcs) CommonDataKeys(com.intellij.openapi.actionSystem.CommonDataKeys) FileUtil(com.intellij.openapi.util.io.FileUtil) VcsException(com.intellij.openapi.vcs.VcsException) SvnConfiguration(org.jetbrains.idea.svn.SvnConfiguration) CommonUpdateProjectAction(com.intellij.openapi.vcs.update.CommonUpdateProjectAction) SvnFileUrlMappingImpl(org.jetbrains.idea.svn.SvnFileUrlMappingImpl) MockChangeListManagerGate(com.intellij.testFramework.vcs.MockChangeListManagerGate) LocalFileSystem(com.intellij.openapi.vfs.LocalFileSystem) EmptyProgressIndicator(com.intellij.openapi.progress.EmptyProgressIndicator) Nullable(org.jetbrains.annotations.Nullable) TimeoutUtil(com.intellij.util.TimeoutUtil) Processor(com.intellij.util.Processor) AnActionEvent(com.intellij.openapi.actionSystem.AnActionEvent) ApplicationManager(com.intellij.openapi.application.ApplicationManager) VcsShowConfirmationOption(com.intellij.openapi.vcs.VcsShowConfirmationOption) NotNull(org.jetbrains.annotations.NotNull) java.util(java.util) TempDirTestFixture(com.intellij.testFramework.fixtures.TempDirTestFixture) PathManager(com.intellij.openapi.application.PathManager) ActionManager(com.intellij.openapi.actionSystem.ActionManager) VcsConfiguration(com.intellij.openapi.vcs.VcsConfiguration) StartupManager(com.intellij.openapi.startup.StartupManager) Project(com.intellij.openapi.project.Project) VfsUtilCore.virtualToIoFile(com.intellij.openapi.vfs.VfsUtilCore.virtualToIoFile) Before(org.junit.Before) StringUtil(com.intellij.openapi.util.text.StringUtil) TestClientRunner(com.intellij.testFramework.vcs.TestClientRunner) IOException(java.io.IOException) TestDialog(com.intellij.openapi.ui.TestDialog) CreateExternalAction(org.jetbrains.idea.svn.actions.CreateExternalAction) VFileContentChangeEvent(com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent) SystemInfo(com.intellij.openapi.util.SystemInfo) File(java.io.File) AbstractJunitVcsTestCase(com.intellij.testFramework.vcs.AbstractJunitVcsTestCase) UndoManager(com.intellij.openapi.command.undo.UndoManager) BulkFileListener(com.intellij.openapi.vfs.newvfs.BulkFileListener) ProcessOutput(com.intellij.execution.process.ProcessOutput) SvnApplicationSettings(org.jetbrains.idea.svn.SvnApplicationSettings) Assert(org.junit.Assert) IdeaTestFixtureFactory(com.intellij.testFramework.fixtures.IdeaTestFixtureFactory) ZipUtil(com.intellij.util.io.ZipUtil) CommonUpdateProjectAction(com.intellij.openapi.vcs.update.CommonUpdateProjectAction) AnActionEvent(com.intellij.openapi.actionSystem.AnActionEvent) Presentation(com.intellij.openapi.actionSystem.Presentation)

Example 59 with After

use of org.junit.After in project opennms by OpenNMS.

the class JmxDatacollectionConfiggeneratorTest method tearDown.

@After
public void tearDown() throws Exception {
    jmxConfiggenerator = null;
    platformMBeanServer.unregisterMBean(new ObjectName("org.opennms.tools.jmxconfiggenerator.jmxconfig:type=JmxTest"));
    platformMBeanServer = null;
}
Also used : ObjectName(javax.management.ObjectName) After(org.junit.After)

Example 60 with After

use of org.junit.After in project alluxio by Alluxio.

the class HdfsFileInputStreamIntegrationTest method after.

@After
public final void after() throws IOException, AlluxioException {
    mInMemInputStream.close();
    mFileSystem.delete(new AlluxioURI(IN_MEMORY_FILE));
    if (mUfsInputStream != null) {
        mUfsInputStream.close();
        mFileSystem.delete(new AlluxioURI(UFS_ONLY_FILE));
    }
    ClientTestUtils.resetClient();
}
Also used : AlluxioURI(alluxio.AlluxioURI) 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