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

Jean-Noel Rouvignac
29.04.2013 cf391fe90c5ef4a80a5c67f349b0ce1611fb2bc5
Fixing failing tests in continuous integration.


AssuredReplicationServerTest.java
Fixed lost configuration lost in r9746.

FakeReplicationDomain.java, ReplicationDomainTest.java:
Added back configuration accidentally removed in r9746.
3 files modified
27 ■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java 12 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeReplicationDomain.java 9 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 6 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java
@@ -247,7 +247,7 @@
    int scenario)
        throws Exception
  {
    ReplicationDomainCfg config = newFakeCfg(serverId, getRsPort(rsId));
    ReplicationDomainCfg config = newFakeCfg(serverId, getRsPort(rsId), groupId);
    return createFakeReplicationDomain(config, groupId, rsId, generationId, assured,
      assuredMode, safeDataLevel, assuredTimeout, scenario, new ServerState(), true);
  }
@@ -312,10 +312,10 @@
    return fakeReplicationDomain;
  }
  private DomainFakeCfg newFakeCfg(int serverId, int rsPort) throws Exception
  private DomainFakeCfg newFakeCfg(int serverId, int rsPort, int groupId) throws Exception
  {
    DN baseDN = DN.decode(TEST_ROOT_DN_STRING);
    DomainFakeCfg fakeCfg = new DomainFakeCfg(baseDN, serverId, newSortedSet("localhost:" + rsPort));
    DomainFakeCfg fakeCfg = new DomainFakeCfg(
        DN.decode(TEST_ROOT_DN_STRING), serverId, newSortedSet("localhost:" + rsPort), groupId);
    fakeCfg.setHeartbeatInterval(1000);
    fakeCfg.setChangetimeHeartbeatInterval(500);
    return fakeCfg;
@@ -2105,7 +2105,7 @@
      // Create and connect DS 2 to RS 1
      // Assured mode: SR
      ServerState serverState = fakeRd1.getServerState();
      ReplicationDomainCfg config = newFakeCfg(FDS2_ID, getRsPort(RS1_ID));
      ReplicationDomainCfg config = newFakeCfg(FDS2_ID, getRsPort(RS1_ID), DEFAULT_GID);
      fakeRDs[2] = createFakeReplicationDomain(config, DEFAULT_GID, RS1_ID,
        DEFAULT_GENID, true, AssuredMode.SAFE_READ_MODE, 1, LONG_TIMEOUT,
              REPLY_OK_DS_SCENARIO, serverState, true);
@@ -3187,7 +3187,7 @@
        TIMEOUT_DS_SCENARIO);
      // DS 2 connected to RS 1 with low window to easily put it in DEGRADED status
      DomainFakeCfg config = newFakeCfg(FDS2_ID, getRsPort(RS1_ID));
      DomainFakeCfg config = newFakeCfg(FDS2_ID, getRsPort(RS1_ID), DEFAULT_GID);
      config.setWindowSize(2);
      fakeRDs[2] = createFakeReplicationDomain(config, DEFAULT_GID, RS1_ID,
        DEFAULT_GENID, true, AssuredMode.SAFE_READ_MODE, 1, LONG_TIMEOUT,
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeReplicationDomain.java
@@ -70,22 +70,23 @@
  private long generationID = 1;
  private FakeReplicationDomain(DN baseDN, int serverID,
      SortedSet<String> replicationServers, long heartbeatInterval)
      SortedSet<String> replicationServers, int window, long heartbeatInterval)
      throws ConfigException
  {
    super(baseDN, serverID, 100);
    DomainFakeCfg fakeCfg = new DomainFakeCfg(baseDN, serverID, replicationServers);
    fakeCfg.setHeartbeatInterval(heartbeatInterval);
    fakeCfg.setChangetimeHeartbeatInterval(500);
    fakeCfg.setWindowSize(window);
    startPublishService(fakeCfg);
    startListenService();
  }
  public FakeReplicationDomain(DN baseDN, int serverID,
      SortedSet<String> replicationServers, long heartbeatInterval,
      SortedSet<String> replicationServers, int window, long heartbeatInterval,
      BlockingQueue<UpdateMsg> queue) throws ConfigException
  {
    this(baseDN, serverID, replicationServers, heartbeatInterval);
    this(baseDN, serverID, replicationServers, window, heartbeatInterval);
    this.queue = queue;
  }
@@ -94,7 +95,7 @@
      String exportString, StringBuilder importString, int exportedEntryCount)
      throws ConfigException
  {
    this(baseDN, serverID, replicationServers, heartbeatInterval);
    this(baseDN, serverID, replicationServers, 100, heartbeatInterval);
    this.exportString = exportString;
    this.importString = importString;
    this.exportedEntryCount = exportedEntryCount;
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java
@@ -96,12 +96,12 @@
      SortedSet<String> servers = newSortedSet("localhost:" + replServerPort1);
      BlockingQueue<UpdateMsg> rcvQueue1 = new LinkedBlockingQueue<UpdateMsg>();
      domain1 = new FakeReplicationDomain(
          testService, domain1ServerId, servers, 1000, rcvQueue1);
          testService, domain1ServerId, servers, 100, 1000, rcvQueue1);
      SortedSet<String> servers2 = newSortedSet("localhost:" + replServerPort2);
      BlockingQueue<UpdateMsg> rcvQueue2 = new LinkedBlockingQueue<UpdateMsg>();
      domain2 = new FakeReplicationDomain(
          testService, domain2ServerId, servers2, 1000, rcvQueue2);
          testService, domain2ServerId, servers2, 100, 1000, rcvQueue2);
      Thread.sleep(500);
@@ -218,7 +218,7 @@
      SortedSet<String> servers = newSortedSet("localhost:" + replServerPort);
      BlockingQueue<UpdateMsg> rcvQueue1 = new LinkedBlockingQueue<UpdateMsg>();
      domain1 = new FakeReplicationDomain(
          testService, domain1ServerId, servers, 100000, rcvQueue1);
          testService, domain1ServerId, servers, 1000, 100000, rcvQueue1);
      /*