微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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,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();
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。