Package org.nasutekds.server.replication.service

Examples of org.nasutekds.server.replication.service.ReplicationBroker.publish()


    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


    //
    addMsg = new AddMsg(gen.newChangeNumber(), domain2dn, domain2uid,
        domain1uid,
        domain2.getObjectClassAttribute(),
        domain2.getAttributes(), new ArrayList<Attribute>());
    broker.publish(addMsg);

    // check that conflict entry was created
    assertNotNull(getEntry(conflictDomain2dn, 1000, true),
      "The conflicting entries were not created");
View Full Code Here

        "33343333-3533-3633-3373-333333833333", baseUUID, false,
        "uid=wrong, ou=people," + TEST_ROOT_DN_STRING,
        "uid=newrdn");
    updateMonitorCount(baseDn, resolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();
    broker.publish(modDnMsg);
    // unfortunately it is difficult to check that the operation
    // did not do anything.
    // The only thing we can check is that resolved naming conflict counter
    // has correctly been incremented.
    int count = 0;
View Full Code Here

        "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);

    count = 0;
    while ((count<2000) && getMonitorDelta() == 0)
    {
      // it is possible that the update has not yet been applied
View Full Code Here

          user1entryUUID, baseUUID,
          personWithUUIDEntry.getObjectClassAttribute(),
          personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
      if (assured)
        addMsg.setAssured(true);
      broker.publish(addMsg);

      /*
       * Check that the entry has been created in the local DS.
       */
      Entry resultEntry = getEntry(personWithUUIDEntry.getDN(), 10000, true);
View Full Code Here

       */
      modMsg = new ModifyMsg(gen.newChangeNumber(), personWithUUIDEntry.getDN(),
          mods, user1entryUUID);
      if (assured)
        modMsg.setAssured(true);
      broker.publish(modMsg);

      boolean found = checkEntryHasAttribute(personWithUUIDEntry.getDN(),
          "telephonenumber", "01 02 45", 10000, true);

      if (found == false)
View Full Code Here

      List<Modification> invalidMods = generatemods("badattribute", "value");
      modMsg = new ModifyMsg(gen.newChangeNumber(), personWithUUIDEntry.getDN(),
          invalidMods, user1entryUUID);
      if (assured)
        modMsg.setAssured(true);
      broker.publish(modMsg);

      found = checkEntryHasAttribute(
          personWithUUIDEntry.getDN(), "badattribute", "value", 10000, true);
      if (found == false)
        fail("The modification has not been correctly replayed.");
View Full Code Here

          gen.newChangeNumber(),
          user1entryUUID, null,
          true, null, "uid= new person");
      if (assured)
        moddnMsg.setAssured(true);
      broker.publish(moddnMsg);

      resultEntry = getEntry(
          DN.decode("uid= new person,ou=People," + TEST_ROOT_DN_STRING), 10000, true);

      assertNotNull(resultEntry,
View Full Code Here

       */
      delMsg = new DeleteMsg("uid= new person,ou=People," + TEST_ROOT_DN_STRING,
          gen.newChangeNumber(), user1entryUUID);
      if (assured)
        delMsg.setAssured(true);
      broker.publish(delMsg);
      resultEntry = getEntry(
          DN.decode("uid= new person,ou=People," + TEST_ROOT_DN_STRING), 10000, false);

      assertNull(resultEntry,
      "The DELETE replication message was not replayed");
View Full Code Here

      {
        // Publish a delete message for this test entry.
        DeleteMsg delMsg = new DeleteMsg(tmp.getDN().toString(),
                                         gen.newChangeNumber(),
                                         uuid);
        broker.publish(delMsg);

        // Wait for the operation to be replayed.
        long endTime = System.currentTimeMillis() + 5000;
        while (getMonitorAttrValue(baseDn, "replayed-updates") == initialCount &&
             System.currentTimeMillis() < endTime)
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.