From 0de6858e9548e84aebc148747be92a811ba33636 Mon Sep 17 00:00:00 2001
From: vharseko <vharseko@3a-systems.ru>
Date: Wed, 12 Jul 2023 16:41:15 +0000
Subject: [PATCH] Restore IT test for server-legacy and fix many errors (#279)

---
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java
index ffdeb1f..4db0fb7 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalTest.java
@@ -95,7 +95,7 @@
          + "objectClass: ds-cfg-replication-domain\n"
          + "cn: " + testName + "\n"
          + "ds-cfg-base-dn: " + TEST_ROOT_DN_STRING + "\n"
-         + "ds-cfg-replication-server: localhost:" + replServerPort + "\n"
+         + "ds-cfg-replication-server: 127.0.0.1:" + replServerPort + "\n"
          + "ds-cfg-server-id: 1\n"
          + "ds-cfg-receive-status: true\n";
 
@@ -203,7 +203,7 @@
     assertFalse(hist.encodeAndPurge().isEmpty());
 
     // Now wait for the purge time to be done
-    Thread.sleep(testPurgeDelayInMillisec + 200);
+    Thread.sleep(testPurgeDelayInMillisec + 500);
 
     // Read the entry back to get its history operational attribute.
     // The hist attribute should now be empty since purged
@@ -225,7 +225,7 @@
    * on one entry, and the reverse ordering that would happen on the
    * second server on a different entry.  Confused yet?
    */
-  @Test(enabled=true, groups="slow")
+  @Test(enabled=true)
   public void conflictSingleValue() throws Exception
   {
     final DN dn1 = DN.valueOf("cn=test1," + TEST_ROOT_DN_STRING);
@@ -240,7 +240,7 @@
      * This must use a different serverId to that of the directory server.
      */
     ReplicationBroker broker =
-      openReplicationSession(baseDN, 2, 100, replServerPort, 1000);
+      openReplicationSession(baseDN, 2, 100, replServerPort, 3000);
 
 
     // Clear the backend and create top entry
@@ -380,7 +380,7 @@
     // Perform a few check on the Operation to see that it
     // was correctly generated.
     assertFakeOperations(dn1, entry, ops, 1);
-
+        
     // Now apply a modifications to the entry and check that the
     // ADD historical information has been preserved.
     TestCaseUtils.applyModifications(false,
@@ -474,6 +474,7 @@
     }
 
       assertEquals(count, assertCount);
+      Thread.sleep(1000);
     }
 
   /**
@@ -507,7 +508,7 @@
         "--set","conflicts-historical-purge-delay:1m");
 
     // Let's go past the purge delay
-    Thread.sleep(60 * 1000);
+    Thread.sleep(90 * 1000);
 
     // launch the purge
     final int maxWaitTimeInSeconds = 120;

--
Gitblit v1.10.0