Java 类org.junit.After 实例源码

项目:apache    文件:AnalyzerTest.java   
@After
public void after(){

    if(analyzer != null){
        try {
            TokenStream ts = analyzer.tokenStream("field", text);
            CharTermAttribute ch = ts.addAttribute(CharTermAttribute.class);
            ts.reset();
            int i = 0;
            while (ts.incrementToken()) {
                i++;
                System.out.print(ch.toString() + "\t");
                if(i % 7 == 0){
                    System.out.println();
                }
            }
            ts.end();
            ts.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
项目:monarch    文件:ConnectionManagerJUnitTest.java   
@After
public void tearDown() throws InterruptedException {
  ds.disconnect();
  if (manager != null) {
    manager.close(false);
  }
  background.shutdownNow();
}
项目:loom    文件:DeltaAdapterTest.java   
@After
public void shutDown() throws Exception {
    LOG.info("shutDown test");
    if (session != null) {
        adapterManager.userDisconnected(session, prov, null);
        aggregationManager.deleteSession(session);
        stitcher.deleteSession(session);
        tam.clearAggregationUpdatesMap(session);
    }
}
项目:Presenter-Client-Android    文件:SettingsActivityTest.java   
/**
 * Restore all settings after the testcase.
 */
@After
public void restoreSettings() {
    Settings settings = new Settings(settingsActivityRule.getActivity());
    settings.silenceDuringPresentation(silenceDuringPresentation);
    settings.useVolumeKeysForNavigation(useVolumeKeysForNavigation);
}
项目:https-github.com-apache-zookeeper    文件:LeaderElectionSupportTest.java   
@After
public void tearDown() throws Exception {
  if (zooKeeper != null) {
    zooKeeper.delete(testRootNode + Thread.currentThread().getId(), -1);
  }

  super.tearDown();
}
项目:ditb    文件:TestMetaTableLocator.java   
@After public void after() {
  try {
    // Clean out meta location or later tests will be confused... they presume
    // start fresh in zk.
    new MetaTableLocator().deleteMetaLocation(this.watcher);
  } catch (KeeperException e) {
    LOG.warn("Unable to delete hbase:meta location", e);
  }

  this.watcher.close();
}
项目:hadoop    文件:TestNonAggregatingLogHandler.java   
@After
public void tearDown() throws IOException {
  dirsHandler.stop();
  dirsHandler.close();
  dispatcher.await();
  dispatcher.stop();
  dispatcher.close();
}
项目:loom    文件:DiscoverAdapterTest.java   
@After
public void shutDown() throws Exception {
    LOG.info("shutDown test");
    adapterManager.userDisconnected(session, prov, null);
    aggregationManager.deleteSession(session);
    stitcher.deleteSession(session);
}
项目:pcf-metrics-trace-example-spring    文件:TraceTest.java   
@After
public void tearDown() throws Exception {
    shoppingCart.destroy();
    orders.destroy();
    payments.destroy();

    Runtime.getRuntime().exec("rm -rf tmp").waitFor();
}
项目:athena    文件:OspfPacketHeaderTest.java   
@After
public void tearDown() throws Exception {
    ospfPacketHeader = null;
    ospfPacketHeader = null;
    channelBuffer = null;
    result2 = null;
    result1 = null;
}
项目:openjdk-jdk10    文件:GraphTest.java   
@After
public void afterTest() {
    DebugContext cached = cachedDebug.get();
    if (cached != null) {
        cached.closeDumpHandlers(true);
    }
}
项目:ditb    文件:TestWALFactory.java   
@After
public void tearDown() throws Exception {
  // testAppendClose closes the FileSystem, which will prevent us from closing cleanly here.
  try {
    wals.close();
  } catch (IOException exception) {
    LOG.warn("Encountered exception while closing wal factory. If you have other errors, this" +
        " may be the cause. Message: " + exception);
    LOG.debug("Exception details for failure to close wal factory.", exception);
  }
  FileStatus[] entries = fs.listStatus(new Path("/"));
  for (FileStatus dir : entries) {
    fs.delete(dir.getPath(), true);
  }
}
项目:alfresco-repository    文件:LocalAuthenticationServiceTest.java   
@After
public void after()
{
    AuthenticationUtil.clearCurrentSecurityContext();
    childApplicationContextManager.destroy();
    childApplicationContextManager = null;
}
项目:angel    文件:AlgoMetricsTest.java   
@After
public void stop() throws Exception {
  try{
    LOG.info("stop local cluster");
    angelClient.stop();
  } catch (Exception x) {
    LOG.error("stop failed ", x);
    throw x;
  }
}
项目:HiTSDB-Client    文件:TestWritePerformance.java   
@After
public void end() throws IOException {
    // 优雅关闭
    System.err.println("关闭客户端!!!");
    tsdb.close();
    t1.compareAndSet(0, System.currentTimeMillis());

    double dt = t1.get() - t0.get();
    System.out.println("处理:" + num);
    System.out.println("时间:" + (dt));
    System.out.println("消耗速率" + SIZE * P_NUM / dt + "K/s");
    System.out.println("结束");
}
项目:monarch    文件:WriteAheadLogJUnitTest.java   
@After
public void cleanUp() {
  Exception e = null;
  try {
    writeAheadLog.deinit();
  } catch (IOException e1) {
    e = e1;
  }
  assertNull(e);
  // cleanDir("/tmp/WALDIR");
}
项目:server-vot    文件:EditPersonRouterTest.java   
@After
public void tearDown() throws Exception {
    service = null;
    serviceResponse = null;
    protector = null;
    router = null;
    payload = null;
    requester = null;
    person = null;
    stringifiedPerson = null;
}
项目:server-vot    文件:AssignMaintainerServiceTest.java   
@After
public void tearDown() throws Exception {
    personRepository = null;
    machineRepository = null;
    authProvider = null;

    assignMaintainerService = null;

    machine = null;
    technician = null;
    supervisor = null;

    assignMaintainerData = null;
}
项目:lambdora    文件:IntegrationTestBase.java   
/**
 * teardown
 */
@After
public void tearDown() {
    // Shutdown the thread pools in DynamoDB Local / Embedded
    if (dynamodbClient != null) {
        dynamodbClient.shutdown();
    }
}
项目:gradle-auto-version    文件:VersionFileTest.java   
@After
public void tearDown() throws Exception {
    System.out.printf("Removing tmpfile: %s%n", tmpFileName);
    new File(tmpFileName).delete();
}
项目:empiria.player    文件:StyleLinkManagerTest.java   
@After
public void tearDown() {
    verifyNoMoreInteractions(styleLinkAppender);
}
项目:alfresco-remote-api    文件:Cleanup.java   
@After
    public void after() throws Exception
    {
//      PublicApiTestFixture fixture = PublicApiTestFixture.getInstance();
//      fixture.shutdown();
    }
项目:FireBaseTest    文件:ContentScreenTest.java   
@After
public void unregisterIdlingResource() {
    IdlingRegistry.getInstance().unregister(EspressoIdlingResource.getIdlingResource());
}
项目:JInsight    文件:JedisPoolInstrumentationTest.java   
@After
public void tearDown() throws Exception {
  pool.close();
}
项目:BEAST    文件:CElectionDescriptionEditorBuilderTest.java   
@After
public void tearDown() {
}
项目:incubator-netbeans    文件:ClusteredIndexablesTest.java   
@After
public void tearDown() {
}
项目:monarch    文件:ReplaceWithOverflowJUnitTest.java   
@After
public void destroyRegion() {
  if (region != null) {
    region.destroyRegion();
  }
}
项目:WLT3Serial    文件:CommonsCollectionsLinuxTests.java   
@After
public void tearDown() {
    try {
        ws.stop();
    } catch(Exception e) {
        //don't care
    }
}
项目:fresco_floodlight    文件:OFSwitchHandlerTestBase.java   
@After
public void tearDown() {
    verifyAll();
}
项目:java-metrics-prototype    文件:PrometheusMetricsReporterTest.java   
@After
public void close() {
    collectorRegistry.clear();
}
项目:rskj    文件:LocalBasicTest.java   
@After
public void tearDown() {
    ConfigHelper.CONFIG.setBlockchainConfig(originalBlockchainConfig);
}
项目:incubator-servicecomb-java-chassis    文件:TestAppManager.java   
@After
public void tearDown() throws Exception {
  findInstancesResponse = null;
  microserviceInstances = null;
}
项目:hashsdn-controller    文件:QuarantinedMonitorActorTest.java   
@After
public void tearDown() throws Exception {
    JavaTestKit.shutdownActorSystem(system);
}
项目:spring-security-oauth2-boot    文件:ResourceServerTokenServicesConfigurationTests.java   
@After
public void close() {
    if (this.context != null) {
        this.context.close();
    }
}
项目:verify-hub    文件:EidasAttributeQueryRequestDtoBuilderTest.java   
@After
public void tearDown() {
    DateTimeUtils.setCurrentMillisSystem();
}
项目:Recordian    文件:SupervisorMapperTest.java   
@After
public void deleteDatabase() {
    DatabaseHelper.deleteDatabase();
}
项目:oscm    文件:EnterpriseLandingpageCtrlTest.java   
@After
public void tearDown() {
    ctrl = null;
}
项目:dubbox-hystrix    文件:FailSafeClusterInvokerTest.java   
@After
public void tearDown(){
    EasyMock.verify(invoker,dic);

}
项目:matrix-toolkits-java    文件:BandLUTest.java   
@After
public void tearDown() throws Exception {
    A = null;
    I = null;
}
项目:sling-org-apache-sling-launchpad-integration-tests    文件:RedirectOnLogoutTest.java   
@After
public void cleanup() throws Exception {
    H.tearDown();
}