当前位置: 首页>>代码示例>>Java>>正文


Java After类代码示例

本文整理汇总了Java中org.junit.After的典型用法代码示例。如果您正苦于以下问题:Java After类的具体用法?Java After怎么用?Java After使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


After类属于org.junit包,在下文中一共展示了After类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: after

import org.junit.After; //导入依赖的package包/类
@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();
        }
    }
}
 
开发者ID:followwwind,项目名称:apache,代码行数:24,代码来源:AnalyzerTest.java

示例2: tearDown

import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws InterruptedException {
  ds.disconnect();
  if (manager != null) {
    manager.close(false);
  }
  background.shutdownNow();
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:ConnectionManagerJUnitTest.java

示例3: shutDown

import org.junit.After; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:HewlettPackard,项目名称:loom,代码行数:11,代码来源:DeltaAdapterTest.java

示例4: restoreSettings

import org.junit.After; //导入依赖的package包/类
/**
 * Restore all settings after the testcase.
 */
@After
public void restoreSettings() {
    Settings settings = new Settings(settingsActivityRule.getActivity());
    settings.silenceDuringPresentation(silenceDuringPresentation);
    settings.useVolumeKeysForNavigation(useVolumeKeysForNavigation);
}
 
开发者ID:FelixWohlfrom,项目名称:Presenter-Client-Android,代码行数:10,代码来源:SettingsActivityTest.java

示例5: tearDown

import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws Exception {
  if (zooKeeper != null) {
    zooKeeper.delete(testRootNode + Thread.currentThread().getId(), -1);
  }

  super.tearDown();
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:9,代码来源:LeaderElectionSupportTest.java

示例6: after

import org.junit.After; //导入依赖的package包/类
@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();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:12,代码来源:TestMetaTableLocator.java

示例7: tearDown

import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws IOException {
  dirsHandler.stop();
  dirsHandler.close();
  dispatcher.await();
  dispatcher.stop();
  dispatcher.close();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:TestNonAggregatingLogHandler.java

示例8: shutDown

import org.junit.After; //导入依赖的package包/类
@After
public void shutDown() throws Exception {
    LOG.info("shutDown test");
    adapterManager.userDisconnected(session, prov, null);
    aggregationManager.deleteSession(session);
    stitcher.deleteSession(session);
}
 
开发者ID:HewlettPackard,项目名称:loom,代码行数:8,代码来源:DiscoverAdapterTest.java

示例9: tearDown

import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws Exception {
    shoppingCart.destroy();
    orders.destroy();
    payments.destroy();

    Runtime.getRuntime().exec("rm -rf tmp").waitFor();
}
 
开发者ID:pivotal-cf,项目名称:pcf-metrics-trace-example-spring,代码行数:9,代码来源:TraceTest.java

示例10: tearDown

import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws Exception {
    ospfPacketHeader = null;
    ospfPacketHeader = null;
    channelBuffer = null;
    result2 = null;
    result1 = null;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:9,代码来源:OspfPacketHeaderTest.java

示例11: afterTest

import org.junit.After; //导入依赖的package包/类
@After
public void afterTest() {
    DebugContext cached = cachedDebug.get();
    if (cached != null) {
        cached.closeDumpHandlers(true);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:GraphTest.java

示例12: tearDown

import org.junit.After; //导入依赖的package包/类
@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);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:16,代码来源:TestWALFactory.java

示例13: after

import org.junit.After; //导入依赖的package包/类
@After
public void after()
{
    AuthenticationUtil.clearCurrentSecurityContext();
    childApplicationContextManager.destroy();
    childApplicationContextManager = null;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:LocalAuthenticationServiceTest.java

示例14: stop

import org.junit.After; //导入依赖的package包/类
@After
public void stop() throws Exception {
  try{
    LOG.info("stop local cluster");
    angelClient.stop();
  } catch (Exception x) {
    LOG.error("stop failed ", x);
    throw x;
  }
}
 
开发者ID:Tencent,项目名称:angel,代码行数:11,代码来源:AlgoMetricsTest.java

示例15: end

import org.junit.After; //导入依赖的package包/类
@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("结束");
}
 
开发者ID:aliyun,项目名称:HiTSDB-Client,代码行数:14,代码来源:TestWritePerformance.java


注:本文中的org.junit.After类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。