Package org.nasutekds.server.replication.common

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()


    // delete the entries to clean the database
    delMsg =
      new DeleteMsg("entryUUID = " + user1entrysecondUUID + "+" +
          DN.decode(user1dn).getRDN().toString() +
          ",ou=People," + TEST_ROOT_DN_STRING,
          gen.newChangeNumber(), user1entrysecondUUID);
    broker.publish(delMsg);
    resultEntry = getEntry(
          DN.decode("entryUUID = " + user1entrysecondUUID + "+" +
              DN.decode(user1dn).getRDN().toString() +
              ",ou=People," + TEST_ROOT_DN_STRING), 10000, false);
View Full Code Here


    assertNull(resultEntry,
        "The DELETE replication message was not replayed");

    delMsg =
      new DeleteMsg("uid=reallynewrdn,ou=People," + TEST_ROOT_DN_STRING,
          gen.newChangeNumber(), user1entryUUID);
    broker.publish(delMsg);
    resultEntry = getEntry(
        DN.decode("uid=reallynewrdn,ou=People," + TEST_ROOT_DN_STRING), 10000, false);

    //  check that the delete operation has been applied
View Full Code Here

        DN.decode("ou=baseDn1,"+baseDn), 10000, true);
    assertNotNull(resultEntry,
        "Entry not added: ou=baseDn1,"+baseDn);

    // - create Add Msg for user1 with parent entry 1 UUID
    addMsg = new AddMsg(gen.newChangeNumber(),
        "uid=new person,ou=baseDn1,"+baseDn,
        user1entryUUID,
        getEntryUUID(DN.decode("ou=baseDn1,"+baseDn)),
        personWithUUIDEntry.getObjectClassAttribute(),
        personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

    // before the deleted is replayed gets renamed correctly.
    //

    // add domain1 entry with 2 children : domain2 and domain3
    addEntry(domain1);
    ChangeNumber olderCn = gen.newChangeNumber();
    Thread.sleep(1000);
    domain1uid = getEntryUUID(DN.decode(domain1dn));
    addEntry(domain2);
    domain2uid = getEntryUUID(DN.decode(domain2dn));
    addEntry(domain3);
View Full Code Here

    updateMonitorCount(baseDn, unresolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();

    // delete domain1
    delMsg = new DeleteMsg(domain1dn, gen.newChangeNumber(), domain1uid);
    broker.publish(delMsg);

    // check that the domain1 has correctly been deleted
    assertNull(getEntry(DN.decode(domain1dn), 10000, false),
        "The DELETE replication message was not replayed");
View Full Code Here

    //
    // Check that when an entry is added on one master below an entry
    // that is currently deleted on another master, the replay of the
    // add on the second master cause the added entry to be renamed
    //
    addMsg = new AddMsg(gen.newChangeNumber(), domain2dn, domain2uid,
        domain1uid,
        domain2.getObjectClassAttribute(),
        domain2.getAttributes(), new ArrayList<Attribute>());
    broker.publish(addMsg);
View Full Code Here

    // Check that when an entry is deleted on a first master and
    // renamed on a second master and the rename is replayed last
    // this is correctly detected as a resolved conflict.
    // To simulate this simply try a modifyDN on a non existent uid.
    modDnMsg = new ModifyDNMsg(
        "uid=new person,ou=People," + TEST_ROOT_DN_STRING, gen.newChangeNumber(),
        "33343333-3533-3633-3373-333333833333", baseUUID, false,
        "uid=wrong, ou=people," + TEST_ROOT_DN_STRING,
        "uid=newrdn");
    updateMonitorCount(baseDn, resolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();
View Full Code Here

     * moved below an entry that does not exist.
     */
    updateMonitorCount(baseDn, unresolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();
    modDnMsg = new ModifyDNMsg(
        "uid=new person,ou=People," + TEST_ROOT_DN_STRING, gen.newChangeNumber(),
        "33333333-3333-3333-3333-333333333333",
        "12343333-3533-3633-3333-333333833333" , false,
        "uid=wrong, ou=people," + TEST_ROOT_DN_STRING,
        "uid=newrdn");
    broker.publish(modDnMsg);
View Full Code Here

       * Now check that when we send message to the ReplicationServer
       * and that they are received and correctly replayed by the server.
       *
       * Start by testing the Add message reception
       */
      AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
          personWithUUIDEntry.getDN().toString(),
          user1entryUUID, baseUUID,
          personWithUUIDEntry.getObjectClassAttribute(),
          personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
      if (assured)
View Full Code Here

      "The send ADD replication message was not applied for "+personWithUUIDEntry.getDN().toString());

      /*
       * Test the reception of Modify Msg
       */
      modMsg = new ModifyMsg(gen.newChangeNumber(), personWithUUIDEntry.getDN(),
          mods, user1entryUUID);
      if (assured)
        modMsg.setAssured(true);
      broker.publish(modMsg);

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.