use of org.junit.After in project heron by twitter.
the class TMasterSinkTest method after.
@After
@SuppressWarnings("unchecked")
public void after() throws Exception {
// Remove the Singleton by Reflection
Field field = SingletonRegistry.INSTANCE.getClass().getDeclaredField("singletonObjects");
field.setAccessible(true);
Map<String, Object> singletonObjects = (Map<String, Object>) field.get(SingletonRegistry.INSTANCE);
singletonObjects.clear();
}
use of org.junit.After in project heron by twitter.
the class FileSinkTest method after.
@After
public void after() {
fileSink.close();
for (File file : tmpDir.listFiles()) {
file.delete();
}
tmpDir.delete();
}
use of org.junit.After in project gerrit by GerritCodeReview.
the class HookTestCase method tearDown.
@Override
@After
public void tearDown() throws Exception {
super.tearDown();
for (File p : cleanup) {
if (!p.delete()) {
p.deleteOnExit();
}
}
cleanup.clear();
}
use of org.junit.After in project aries by apache.
the class TransactionLogTest method destroy.
@After
public void destroy() throws Exception {
txControl.close();
checkLogClosed(txControl);
try (Connection conn = dataSource.getConnection()) {
conn.createStatement().execute("shutdown immediately");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
delete(new File("target/recovery-test"));
}
use of org.junit.After in project phoenix by apache.
the class QueryTimeoutIT method assertNoUnfreedMemory.
@After
public void assertNoUnfreedMemory() throws SQLException {
Connection conn = DriverManager.getConnection(getUrl());
try {
long unfreedBytes = conn.unwrap(PhoenixConnection.class).getQueryServices().clearCache();
assertEquals(0, unfreedBytes);
} finally {
conn.close();
}
}
Aggregations