本文整理汇总了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();
}
}
}
示例2: tearDown
import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws InterruptedException {
ds.disconnect();
if (manager != null) {
manager.close(false);
}
background.shutdownNow();
}
示例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);
}
}
示例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);
}
示例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();
}
示例7: tearDown
import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws IOException {
dirsHandler.stop();
dirsHandler.close();
dispatcher.await();
dispatcher.stop();
dispatcher.close();
}
示例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);
}
示例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();
}
示例10: tearDown
import org.junit.After; //导入依赖的package包/类
@After
public void tearDown() throws Exception {
ospfPacketHeader = null;
ospfPacketHeader = null;
channelBuffer = null;
result2 = null;
result1 = null;
}
示例11: afterTest
import org.junit.After; //导入依赖的package包/类
@After
public void afterTest() {
DebugContext cached = cachedDebug.get();
if (cached != null) {
cached.closeDumpHandlers(true);
}
}
示例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);
}
}
示例13: after
import org.junit.After; //导入依赖的package包/类
@After
public void after()
{
AuthenticationUtil.clearCurrentSecurityContext();
childApplicationContextManager.destroy();
childApplicationContextManager = null;
}
示例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;
}
}
示例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("结束");
}