use of org.junit.AfterClass in project Smack by igniterealtime.
the class EntityCapsTest method tearDown.
@AfterClass
public void tearDown() throws NotConnectedException, InterruptedException {
RosterUtil.ensureNotSubscribedToEachOther(conOne, conTwo);
ServiceDiscoveryManager[] sdms = new ServiceDiscoveryManager[] { sdmOne, sdmTwo };
for (ServiceDiscoveryManager sdm : sdms) {
for (String dummyFeature : dummyFeatures) {
sdm.removeFeature(dummyFeature);
}
}
}
use of org.junit.AfterClass in project junit4 by junit-team.
the class CategoryValidatorTest method errorIsAddedWhenCategoryIsUsedWithAfterClass.
@Test
public void errorIsAddedWhenCategoryIsUsedWithAfterClass() {
FrameworkMethod method = new TestClass(CategoryTest.class).getAnnotatedMethods(AfterClass.class).get(0);
testAndAssertErrorMessage(method, "@AfterClass can not be combined with @Category");
}
use of org.junit.AfterClass in project orientdb by orientechnologies.
the class OrientCommitMT method afterClass.
@AfterClass
public static void afterClass() throws IOException {
if (DB_URL.startsWith("remote:")) {
OServerAdmin serverAdmin = new OServerAdmin(DB_URL);
serverAdmin.connect("root", ODatabaseHelper.getServerRootPassword());
if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType())) {
serverAdmin.dropDatabase(OrientGraphTest.getStorageType());
}
} else {
OrientGraph graph = new OrientGraph(DB_URL, DB_USER, DB_PASSWORD);
graph.drop();
}
}
use of org.junit.AfterClass in project orientdb by orientechnologies.
the class OrientGraphNoTxRemoteTest method stopEmbeddedServer.
@AfterClass
public static void stopEmbeddedServer() throws Exception {
server.shutdown();
Thread.sleep(1000);
Orient.instance().closeAllStorages();
if (oldOrientDBHome != null)
System.setProperty("ORIENTDB_HOME", oldOrientDBHome);
else
System.clearProperty("ORIENTDB_HOME");
final File file = new File(serverHome);
deleteDirectory(file);
OGlobalConfiguration.NETWORK_LOCK_TIMEOUT.setValue(15000);
Orient.instance().startup();
}
use of org.junit.AfterClass in project querydsl by querydsl.
the class AbstractJDOTest method doCleanUp.
@AfterClass
public static void doCleanUp() {
// Clean out the database
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
try {
tx.begin();
pm.newQuery(Store.class).deletePersistentAll();
pm.newQuery(Book.class).deletePersistentAll();
pm.newQuery(Product.class).deletePersistentAll();
tx.commit();
} finally {
if (tx.isActive()) {
tx.rollback();
}
pm.close();
}
}
Aggregations