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

Fabio Pistolesi
10.59.2015 5c9738983782929439e25a00b20722516fc947cd
Tweak pluggable backend unit tests for maven. A test was missing an annotation and another a dependency on a previous test. Also, having both dependencies and expected exceptions in annotations on a chain of dependencies creates problems.
1 files modified
17 ■■■■ changed files
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java 17 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java
@@ -521,7 +521,7 @@
      "postalAddress: {cn}${street}${l}, {st}  {postalCode}",
      "description: This is the description for {cn}.",
      ""};
    // Add suffix and barnch entries
    // Add suffix and branch entries
    ldifNumberOfEntries += 2;
  }
@@ -550,6 +550,7 @@
    }
  }
  @Test
  public void testAdd() throws Exception
  {
    addEntriesToBackend(topEntries);
@@ -743,16 +744,24 @@
    assertTrue(backend.getEntry(oldEntry.getName()).hasValue(modifyAttribute, null, modifyValue));
  }
  @Test(dependsOnMethods = { "testAdd", "testRenameEntry", "testHasSubordinates" })
  @Test(dependsOnMethods = { "testAdd", "testRenameEntry", "testHasSubordinates", "testUtilityAPIs" })
  public void testDeleteEntry() throws Exception
  {
    deleteEntry(dnToDel);
  }
  @Test(dependsOnMethods = "testDeleteEntry", expectedExceptions = DirectoryException.class)
  @Test(dependsOnMethods = "testDeleteEntry")
  public void testDeleteAlreadyDeletedEntry() throws Exception
  {
    deleteEntry(dnToDel);
    try
    {
      deleteEntry(dnToDel);
      fail("Should have generated a DirectoryException");
    }
    catch (DirectoryException de)
    {
      // Expected exception, do nothing, test succeeds.
    }
  }
  private void deleteEntry(DN dn) throws Exception