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

Matthew Swift
26.55.2011 203ea8bdd3015b374fcdf633d3c6fe2b4c139279
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -1307,7 +1307,7 @@
    Socket s = null;
    try {
      s = new Socket("127.0.0.1", TestCaseUtils.getServerLdapPort());
      s.setSoTimeout(3000);
      TestCaseUtils.configureSocket(s);
      ASN1Reader r = ASN1.getReader(s.getInputStream());
      ASN1Writer w = ASN1.getWriter(s.getOutputStream());
@@ -1335,6 +1335,23 @@
  }
  /**
   * Configures a socket for use in unit tests. This should only be used if the
   * socket is not expected to timeout.
   *
   * @param s
   *          The socket.
   * @throws Exception
   *           If an unexpected exception occurred while configuring the socket.
   */
  public static void configureSocket(Socket s) throws Exception
  {
    s.setSoTimeout(60 * 1000);
  }
  /**
   * Adds the provided entry to the Directory Server using an internal
   * operation.
@@ -1948,13 +1965,13 @@
    return buffer.toString();
  }
  public static void enableBackend(String backendID)
  {
    dsconfig("set-backend-prop", "--backend-name", backendID,
             "--set", "enabled:true");
  }
  public static void disableBackend(String backendID)
  {
    dsconfig("set-backend-prop", "--backend-name", backendID,