mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ludovic Poitou
23.33.2013 04673fe2f2003091298cd343ee9031bdbe943990
Add AfterClass cleanup to make sure tests are not impacting further downstream tests. This issue was detected on the Cloudbees instance using JDK8 EA
2 files modified
10 ■■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/authorization/dseecompat/SSFTestCase.java 2 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/UniqueAttributePluginTestCase.java 8 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/authorization/dseecompat/SSFTestCase.java
@@ -100,6 +100,8 @@
    @BeforeClass
    public void setupClass() throws Exception {
//      TestCaseUtils.restartServer();
      TestCaseUtils.initializeTestBackend(true);
      TestCaseUtils.dsconfig(
              "create-password-policy",
              "--type", "password-policy",
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/UniqueAttributePluginTestCase.java
@@ -106,6 +106,8 @@
  public void tearDown() throws Exception {
    clearConfigEntries();
    TestCaseUtils.clearJEBackend(false,"userRoot", "dc=example,dc=com");
    clearAcis("o=test");
    TestCaseUtils.clearMemoryBackend(TestCaseUtils.TEST_BACKEND_ID);
  }
@@ -726,6 +728,12 @@
    }
  }
  private void clearAcis(String suffix) throws Exception
  {
    deleteAttrsFromEntry(DN.decode("ou=People," + suffix), "aci");
    deleteAttrsFromEntry(DN.decode("ou=People1," + suffix), "aci");
  }
  /**
   * Remove the attributes specified by the attribute type strings from the
   * entry corresponding to the dn argument.