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 SmartCity-Market by TechnionYP5777.
the class UpdateProductPicturesEmployeeTest method cleanup.
@AfterClass
public static void cleanup() {
if (doCleanUp)
try {
File fileToDelete = new File(createdFilePath);
fileToDelete.delete();
} catch (Exception e) {
System.out.println(e + "");
fail();
}
}
use of org.junit.AfterClass in project tdi-studio-se by Talend.
the class AddContextCommentValueMigrationTaskTest method afterAllTests.
@AfterClass
public static void afterAllTests() throws PersistenceException, CoreException {
removeTempProject();
Context ctx = CoreRuntimePlugin.getInstance().getContext();
RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
repositoryContext.setProject(originalProject);
originalProject = null;
sampleProject = null;
}
use of org.junit.AfterClass in project tdi-studio-se by Talend.
the class FixUnevenItemContextParametersMigrationTaskTest method afterAllTests.
@AfterClass
public static void afterAllTests() throws PersistenceException, CoreException {
removeTempProject();
Context ctx = CoreRuntimePlugin.getInstance().getContext();
RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
repositoryContext.setProject(originalProject);
originalProject = null;
sampleProject = null;
}
Aggregations