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

matthew_swift
30.14.2007 e37077ea552a101d04e834ef50b24d0d06c6e498
Fix issue 2192: dsconfig delete-backend doesn't work

The delete-xxx sub-command was silently failing in non-interactive mode because it was silently prompting for confirmation and defaulting to "no". This change also re-enables the file system entry cache unit tests which were failing as a result of this bug.
2 files modified
10 ■■■■■ changed files
opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java 6 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/FileSystemEntryCacheTestCase.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
@@ -329,6 +329,7 @@
  // Confirm deletion.
  private boolean confirmDeletion(ConsoleApplication app) throws CLIException {
    if (app.isInteractive()) {
    Message prompt = INFO_DSCFG_CONFIRM_DELETE.get(relation
        .getUserFriendlyName());
    app.println();
@@ -338,9 +339,10 @@
          .getUserFriendlyName());
      app.printVerboseMessage(msg);
      return false;
    } else {
      return true;
    }
  }
    return true;
  }
}
opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/FileSystemEntryCacheTestCase.java
@@ -619,7 +619,7 @@
  /**
   * Tests cache persistence with consistent backend.
   */
  @Test(enabled=false, groups = "slow")
  @Test(groups = "slow")
  @SuppressWarnings("unchecked")
  public void testCachePersistence()
         throws Exception
@@ -672,7 +672,7 @@
  /**
   * Tests cache persistence with inconsistent backend.
   */
  @Test(enabled=false, groups = "slow")
  @Test(groups = "slow")
  @SuppressWarnings("unchecked")
  public void testCachePersistenceInconsistent()
         throws Exception