From 661dc06886df4738b9add2206a39d74d7dedf476 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Thu, 10 Sep 2026 11:57:37 +0000
Subject: [PATCH] [#908] Wait for the changes being applied before a domain going down saves its ServerState (#945)
---
opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java
index 662e1a5..f9b1b1f 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java
@@ -782,13 +782,24 @@
}
}
- private void assertExportSucessful(ReplicationDomain domain1,
- ReplicationDomain domain2, String exportedData, StringBuffer importedData)
+ private void assertExportSucessful(FakeReplicationDomain domain1,
+ FakeReplicationDomain domain2, String exportedData, StringBuffer importedData)
{
assertEquals(getLeftEntryCount(domain2), 0, "Wrong LeftEntryCount for export");
assertEquals(getLeftEntryCount(domain1), 0, "Wrong LeftEntryCount for import");
assertEquals(importedData.length(), exportedData.length());
assertEquals(importedData.toString(), exportedData);
+ /*
+ * The direction of the total update, as each side reported it while it was in it.
+ * ieRunning() cannot tell the two apart, and something which is guarding the data of a
+ * replica has to: the exporter keeps its data and its ServerState - and keeps replaying
+ * into them - while the importer is having both replaced.
+ */
+ assertEquals(domain2.importReportedDuringImport(), Boolean.TRUE,
+ "the replica whose data is being replaced must report a total update into itself");
+ assertEquals(domain1.importReportedDuringExport(), Boolean.FALSE,
+ "the replica which is exporting must not report a total update into itself:"
+ + " its data and its ServerState are left alone");
}
private long getLeftEntryCount(ReplicationDomain domain)
--
Gitblit v1.10.0