use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.
the class RestTest method cleanup.
@AfterClass
public void cleanup() throws Exception {
PrivilegeManager pm = PrivilegeManager.getInstance(REALM, adminSubject);
pm.remove(PRIVILEGE_NAME);
IdRepoUtils.deleteIdentity(REALM, user);
}
use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.
the class IOTest method cleanup.
@AfterClass
public void cleanup() {
File f = new File(FILENAME);
f.delete();
f = new File(JSON_FILENAME);
f.delete();
}
use of org.testng.annotations.AfterClass in project rhsm-qe by RedHatQE.
the class ComplianceTests method configureProductCertDirAfterClass.
@AfterClass(groups = { "setup" }, alwaysRun = true)
public void configureProductCertDirAfterClass() {
if (clienttasks == null)
return;
if (this.originalProductCertDir != null) {
clienttasks.updateConfFileParameter(clienttasks.rhsmConfFile, "productCertDir", this.originalProductCertDir);
// TEMPORARY WORKAROUND
boolean invokeWorkaroundWhileBugIsOpen = true;
// Bug 1351370 - [ERROR] subscription-manager:31276 @dbus_interface.py:60 - org.freedesktop.DBus.Python.OSError: Traceback
String bugId = "1351370";
try {
if (invokeWorkaroundWhileBugIsOpen && BzChecker.getInstance().isBugOpen(bugId)) {
log.fine("Invoking workaround for " + BzChecker.getInstance().getBugState(bugId).toString() + " Bugzilla " + bugId + ". (https://bugzilla.redhat.com/show_bug.cgi?id=" + bugId + ")");
SubscriptionManagerCLITestScript.addInvokedWorkaround(bugId);
} else {
invokeWorkaroundWhileBugIsOpen = false;
}
} catch (BugzillaAPIException be) {
/* ignore exception */
} catch (RuntimeException re) {
/* ignore exception */
}
if (invokeWorkaroundWhileBugIsOpen) {
// this is a workaround as shown in the ADDTIONAL INFO of Bug 1351370 TO RECOVER FROM A BAD STATE
// Enforcing
SSHCommandResult selinuxModeResult = client.runCommandAndWait("getenforce");
client.runCommandAndWait("setenforce Permissive");
clienttasks.unregister_(null, null, null, null);
clienttasks.clean_();
client.runCommandAndWait("setenforce " + selinuxModeResult.getStdout().trim());
}
// END OF WORKAROUND
}
allProductsSubscribableByOneCommonServiceLevelValue = null;
allProductsSubscribableByMoreThanOneCommonServiceLevelValues.clear();
}
use of org.testng.annotations.AfterClass in project incubator-gobblin by apache.
the class DatePartitionedAvroFileExtractorTest method tearDown.
@AfterClass
public void tearDown() throws IOException {
this.writer.close();
FileUtils.deleteDirectory(new File(TEST_ROOT_DIR));
}
use of org.testng.annotations.AfterClass in project incubator-gobblin by apache.
the class TimeBasedAvroWriterPartitionerTest method tearDown.
@AfterClass
public void tearDown() throws IOException {
this.writer.close();
FileUtils.deleteDirectory(new File(TEST_ROOT_DIR));
}
Aggregations