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

pgamba
10.39.2009 3be10ed8b0013d8f8b1393f076573fde548095c2
rename cookie attribute to changeLogCookie & fix debug enabled by mistake
3 files modified
36 ■■■■ changed files
opends/src/server/org/opends/server/loggers/debug/DebugLogger.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java 12 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ExternalChangeLogTest.java 20 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/loggers/debug/DebugLogger.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2007-2008 Sun Microsystems, Inc.
 *      Copyright 2007-2009 Sun Microsystems, Inc.
 */
package org.opends.server.loggers.debug;
@@ -453,7 +453,7 @@
   */
  public static boolean debugEnabled()
  {
    return true;
    return enabled;
  }
  /**
opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
@@ -939,7 +939,7 @@
    // MUST attributes
    // ECL Changelog draft change number
    Attribute a = Attributes.create("changeNumber",
    Attribute a = Attributes.create("changenumber",
        String.valueOf(draftChangenumber));
    attrList = new ArrayList<Attribute>(1);
    attrList.add(a);
@@ -950,7 +950,7 @@
    dateFormat = new SimpleDateFormat(DATE_FORMAT_GMT_TIME);
    dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); // ??
    a = Attributes.create(
        DirectoryServer.getAttributeType("changeTime", true),
        DirectoryServer.getAttributeType("changetime", true),
        dateFormat.format(new Date(changeNumber.getTime())));
    attrList = new ArrayList<Attribute>(1);
    attrList.add(a);
@@ -965,7 +965,7 @@
    */
    //
    a = Attributes.create("changeType", changetype);
    a = Attributes.create("changetype", changetype);
    attrList = new ArrayList<Attribute>(1);
    attrList.add(a);
    uAttrs.put(a.getAttributeType(), attrList);
@@ -980,13 +980,13 @@
    // MAY attributes
    a = Attributes.create("replicationCSN", changeNumber.toString());
    a = Attributes.create("replicationcsn", changeNumber.toString());
    attrList = new ArrayList<Attribute>(1);
    attrList.add(a);
    operationalAttrs.put(a.getAttributeType(), attrList);
    //
    a = Attributes.create("replicaIdentifier",
    a = Attributes.create("replicaidentifier",
        Short.toString(changeNumber.getServerId()));
    attrList = new ArrayList<Attribute>(1);
    attrList.add(a);
@@ -1031,7 +1031,7 @@
      operationalAttrs.put(a.getAttributeType(), attrList);
    }
    a = Attributes.create("cookie", cookie);
    a = Attributes.create("changelogcookie", cookie);
    attrList = new ArrayList<Attribute>(1);
    attrList.add(a);
    operationalAttrs.put(a.getAttributeType(), attrList);
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ExternalChangeLogTest.java
@@ -395,8 +395,6 @@
        SearchScope.WHOLE_SUBTREE,
        LDAPFilter.decode("(objectclass=*)"));
      debugInfo(tn, "Res code=" + op.getResultCode());
      debugInfo(tn, "Res OE=" + ResultCode.OPERATIONS_ERROR);
      // Error because no cookie
      assertEquals(
          op.getResultCode(), ResultCode.OPERATIONS_ERROR,
@@ -675,7 +673,7 @@
          {
            if (i++==2)
              cookie =
                entry.getAttribute("cookie").get(0).iterator().next().toString();
                entry.getAttribute("changelogcookie").get(0).iterator().next().toString();
          }
          catch(NullPointerException e)
          {}
@@ -728,7 +726,7 @@
          try
          {
          cookie =
            entry.getAttribute("cookie").get(0).iterator().next().toString();
            entry.getAttribute("changelogcookie").get(0).iterator().next().toString();
          }
          catch(NullPointerException e)
          {}
@@ -785,7 +783,7 @@
          try
          {
          cookie =
            resultEntry.getAttribute("cookie").get(0).iterator().next().toString();
            resultEntry.getAttribute("changelogcookie").get(0).iterator().next().toString();
          }
          catch(NullPointerException e)
          {}
@@ -831,7 +829,7 @@
          try
          {
          cookie =
            resultEntry.getAttribute("cookie").get(0).iterator().next().toString();
            resultEntry.getAttribute("changelogcookie").get(0).iterator().next().toString();
          }
          catch(NullPointerException e)
          {}
@@ -1050,7 +1048,7 @@
          0, // Size limit
          0, // Time limit
          false, // Types only
          LDAPFilter.decode("(targetDN=*"+tn+"*,o=test)"),
          LDAPFilter.decode("(targetdn=*"+tn+"*,o=test)"),
          attributes,
          controls,
          null);
@@ -1079,7 +1077,7 @@
            checkValue(resultEntry,"replicaidentifier","1201");
            checkValue(resultEntry,"targetdn","uid="+tn+"1," + TEST_ROOT_DN_STRING);
            checkValue(resultEntry,"changetype","delete");
            checkValue(resultEntry,"cookie","o=test:"+cn1.toString()+";");
            checkValue(resultEntry,"changelogcookie","o=test:"+cn1.toString()+";");
            checkValue(resultEntry,"targetentryuuid",tn+"uuid1");
            checkValue(resultEntry,"changenumber","-1");
          } else if (i==2)
@@ -1094,7 +1092,7 @@
            checkValue(resultEntry,"replicaidentifier","1201");
            checkValue(resultEntry,"targetdn","uid="+tn+"2," + TEST_ROOT_DN_STRING);
            checkValue(resultEntry,"changetype","add");
            checkValue(resultEntry,"cookie","o=test:"+cn2.toString()+";");
            checkValue(resultEntry,"changelogcookie","o=test:"+cn2.toString()+";");
            checkValue(resultEntry,"targetentryuuid",user1entryUUID);
            checkValue(resultEntry,"changenumber","-1");
          } else if (i==3)
@@ -1107,7 +1105,7 @@
            checkValue(resultEntry,"replicaidentifier","1201");
            checkValue(resultEntry,"targetdn","uid="+tn+"3," + TEST_ROOT_DN_STRING);
            checkValue(resultEntry,"changetype","modify");
            checkValue(resultEntry,"cookie","o=test:"+cn3.toString()+";");
            checkValue(resultEntry,"changelogcookie","o=test:"+cn3.toString()+";");
            checkValue(resultEntry,"targetentryuuid",tn+"uuid3");
            checkValue(resultEntry,"changenumber","-1");
          } else if (i==4)
@@ -1117,7 +1115,7 @@
            checkValue(resultEntry,"replicaidentifier","1201");
            checkValue(resultEntry,"targetdn","uid="+tn+"4," + TEST_ROOT_DN_STRING);
            checkValue(resultEntry,"changetype","modrdn");
            checkValue(resultEntry,"cookie","o=test:"+cn4.toString()+";");
            checkValue(resultEntry,"changelogcookie","o=test:"+cn4.toString()+";");
            checkValue(resultEntry,"targetentryuuid",tn+"uuid4");
            checkValue(resultEntry,"newrdn","uid=ECLDirectAllOpsnew4");            
            checkValue(resultEntry,"newsuperior",TEST_ROOT_DN_STRING2);