use of org.testng.annotations.AfterSuite in project pinot by linkedin.
the class TestStarTreeOffheapFormat method tearDown.
/**
* Cleanup any temporary files and directories.
* @throws IOException
*/
@AfterSuite
void tearDown() throws IOException {
FileUtils.deleteDirectory(new File(SEGMENT_DIR_NAME));
FileUtils.deleteDirectory(new File(SEGMENT_OFF_HEAP_DIR_NAME));
}
use of org.testng.annotations.AfterSuite in project OpenAM by OpenRock.
the class DataStoreTest method deleteDataStores.
/*
* The following test will fail under flat file configuration datastore
* because there is not notification in place. Service Configurations is not
* made avaiable after they are created.
* Works OK with Sun DS as configuration datastore.
@Parameters ({"realm"})
@Test(groups = {"cli-datastore", "ops", "update-datastore"},
dependsOnMethods = {"createDataStore"}
)
public void updateDataStore(String realm)
throws CLIException {
String[] param = {realm};
entering("updateDataStore", param);
String[] args = {
"update-datastore",
CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME,
realm,
CLIConstants.PREFIX_ARGUMENT_LONG + DatastoreOptions.DATASTORE_NAME,
TEST_DATASTORE_NAME,
CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.ATTRIBUTE_VALUES,
"sunFilesIdRepoDirectory=/tmp/clitestdatastoreChanged"
};
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("updateDataStore");
} */
@Parameters({ "realm" })
@AfterSuite(groups = { "cli-datastore", "delete-datastores" })
public void deleteDataStores(String realm) throws CLIException {
String[] param = { realm };
entering("deleteDataStores", param);
String[] args = { "delete-datastores", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm, CLIConstants.PREFIX_ARGUMENT_LONG + DatastoreOptions.DATASTORE_NAMES, TEST_DATASTORE_NAME };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("deleteDataStores");
}
use of org.testng.annotations.AfterSuite in project rhsm-qe by RedHatQE.
the class SubscriptionManagerCLITestScript method unregisterClientsAfterSuite.
@AfterSuite(groups = { "cleanup" }, description = "subscription manager tear down")
public void unregisterClientsAfterSuite() {
for (SubscriptionManagerTasks clienttasks : Arrays.asList(client1tasks, client2tasks)) {
if (clienttasks != null) {
// release the entitlements consumed by the current registration
clienttasks.unregister_(null, null, null, null);
// in case the unregister fails, also clean the client
clienttasks.clean_();
}
}
}
use of org.testng.annotations.AfterSuite in project rhsm-qe by RedHatQE.
the class SubscriptionManagerCLITestScript method deleteAllRegisteredConsumerEntitlementsAfterSuite.
@AfterSuite(groups = { "cleanup" }, description = "attempt to delete any abandoned entitlements granted during the run of this suite")
public void deleteAllRegisteredConsumerEntitlementsAfterSuite() {
// /*debugTestSSL*/ if(true) return;
for (SubscriptionManagerTasks clienttasks : Arrays.asList(client1tasks, client2tasks)) {
if (clienttasks != null) {
// determine the url to the server
String url = "https://" + clienttasks.getConfFileParameter(clienttasks.rhsmConfFile, "server", "hostname") + ":" + clienttasks.getConfFileParameter(clienttasks.rhsmConfFile, "server", "port") + clienttasks.getConfFileParameter(clienttasks.rhsmConfFile, "server", "prefix");
// for (String consumerCertPath : Arrays.asList(clienttasks.sshCommandRunner.runCommandAndWait("find "+allRegisteredConsumerCertsDir+" -name '*cert.pem'").getStdout().trim().split("\n"))) {
for (String consumerCertPath : Arrays.asList(clienttasks.sshCommandRunner.runCommandAndWait("ls -t1 " + allRegisteredConsumerCertsDir + "/*cert.pem").getStdout().trim().split("\n"))) {
// process consumers in reverse order of their creation
if (consumerCertPath.isEmpty())
continue;
// extract the uuid from the consumerCertPath
String uuid = consumerCertPath.replace(allRegisteredConsumerCertsDir, "").replace("_cert.pem", "").replace("/", "");
// extract the key from the consumerCertPath
String consumerKeyPath = consumerCertPath.replace("cert.pem", "key.pem");
// curl -k --cert /etc/pki/consumer/cert.pem --key /etc/pki/consumer/key.pem -X DELETE https://subscription.rhn.stage.redhat.com/subscription/consumers/2f801f45-3b79-42ee-9013-f4ad5bd35c3a/entitlements
clienttasks.sshCommandRunner.runCommandAndWait("curl --stderr /dev/null --insecure --cert " + consumerCertPath + " --key " + consumerKeyPath + " --request DELETE " + url + "/consumers/" + uuid + "/entitlements");
}
}
}
}
use of org.testng.annotations.AfterSuite in project ballerina by ballerina-lang.
the class SQLXATransactionsTest method cleanup.
@AfterSuite
public void cleanup() {
SQLDBUtils.deleteDirectory(new File(SQLDBUtils.DB_DIRECTORY_H2_1));
SQLDBUtils.deleteDirectory(new File(SQLDBUtils.DB_DIRECTORY_H2_2));
}
Aggregations