From 2a63c4d4d94643b71545bd6b7d7925bc444dd68e Mon Sep 17 00:00:00 2001 From: Valera V Harseko Date: Sun, 5 Jul 2026 09:03:19 +0300 Subject: [PATCH 1/3] Enable the remaining slow-group tests in the default build Move all remaining tests out of the "slow" TestNG group so that they run in the default build: the group has been excluded from CI since the Maven migration, and the full audit of the group showed these tests are green. Also enable the two remaining disabled tests, both verified working: - PostConnectedDisconnectTest.checkPostConnectDisconnectPlugin (~15s); - AssuredReplicationServerTest.testSafeReadOneRSComplex, disabled historically as "working but 17.5 minutes to run": it completes its 240 combinations in about 6 minutes on current hardware. Raise forkedProcessTimeoutInSeconds from 900 to 2400: the fully enabled AssuredReplicationServerTest takes about 20 minutes and no longer fits the old watchdog. The excludegroups=slow filter itself is kept for now: the slow annotations remaining in files owned by the other pull requests of this series must not be enabled before those fixes are merged; a final cleanup can drop the filter once the series has landed. Files touched by the other pull requests of the series are left untouched here to avoid merge conflicts. --- opendj-server-legacy/pom.xml | 2 +- .../server/core/AbandonOperationTestCase.java | 5 +++-- .../server/core/AddOperationTestCase.java | 3 ++- .../server/core/BindOperationTestCase.java | 5 +++-- .../server/core/DeleteOperationTestCase.java | 3 ++- .../server/core/ModifyOperationTestCase.java | 3 ++- .../server/core/PasswordPolicyTestCase.java | 3 ++- .../server/core/TestModifyDNOperation.java | 2 +- ...tributeValuePasswordValidatorTestCase.java | 2 +- ...CharacterSetPasswordValidatorTestCase.java | 3 ++- .../extensions/DefaultEntryCacheTestCase.java | 3 ++- .../extensions/FIFOEntryCacheTestCase.java | 3 ++- .../SoftReferenceEntryCacheTestCase.java | 3 ++- .../extensions/TLSByteChannelTestCase.java | 3 ++- .../LDIFConnectionHandlerTestCase.java | 7 ++++--- .../jmx/PostConnectedDisconnectTest.java | 3 ++- .../server/replication/DependencyTest.java | 7 ++++--- .../server/replication/GenerationIdTest.java | 4 ++-- .../server/replication/InitOnLineTest.java | 17 ++++++++------- .../replication/ProtocolWindowTest.java | 3 ++- .../opends/server/replication/ReSyncTest.java | 5 +++-- .../plugin/AssuredReplicationPluginTest.java | 9 ++++---- .../plugin/FractionalReplicationTest.java | 9 ++++---- .../plugin/GroupIdHandshakeTest.java | 3 ++- .../plugin/ReplicationServerFailoverTest.java | 3 ++- .../ReplicationServerLoadBalancingTest.java | 9 ++++---- .../replication/plugin/StateMachineTest.java | 5 +++-- .../server/AssuredReplicationServerTest.java | 21 ++++++++++--------- .../server/types/PrivilegeTestCase.java | 12 +++++------ .../util/CertificateManagerTestCase.java | 3 ++- .../org/opends/server/util/TestCrypt.java | 5 +++-- 31 files changed, 97 insertions(+), 71 deletions(-) diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml index 9d53b1d0bc..19904ec345 100644 --- a/opendj-server-legacy/pom.xml +++ b/opendj-server-legacy/pom.xml @@ -1258,7 +1258,7 @@ src/test/java - 900 + 2400 120 org/opends/server/snmp/** diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/AbandonOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/AbandonOperationTestCase.java index e9dab72157..2dfe64d6cb 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/AbandonOperationTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/AbandonOperationTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.core; @@ -193,7 +194,7 @@ public void testAbandonInternal() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = { "slow" }) + @Test public void testDisconnectInPreParse() throws Exception { @@ -223,7 +224,7 @@ public void testDisconnectInPreParse() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = { "slow" }) + @Test public void testNoSuchOperation() throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java index ec08c374ee..0ef908f5c4 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.core; @@ -1435,7 +1436,7 @@ private CancelRequest newCancelRequest(String cancelReason) * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testCannotLockEntry() throws Exception { TestCaseUtils.initializeTestBackend(true); diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/BindOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/BindOperationTestCase.java index fed6ee30bf..da60729527 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/BindOperationTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/BindOperationTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.core; @@ -1481,7 +1482,7 @@ public void testRebindClearsAuthInfo() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testSubtreeDeleteClearsAuthInfo() throws Exception { @@ -1541,7 +1542,7 @@ public void testSubtreeDeleteClearsAuthInfo() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testSubtreeModifyUpdatesAuthInfo() throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/DeleteOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/DeleteOperationTestCase.java index ff15bbd26a..21e134d09c 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/DeleteOperationTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/DeleteOperationTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.core; @@ -691,7 +692,7 @@ public void testCancelAfterOperation() throws Exception * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = { "slow" }) + @Test public void testCannotLockEntry() throws Exception { TestCaseUtils.initializeTestBackend(true); diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java index 513f4528fb..31ed0c3308 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2011 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.core; @@ -2651,7 +2652,7 @@ public void testCancelAfterOperation(String baseDN) * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "baseDNs", groups = { "slow" }) + @Test(dataProvider = "baseDNs") public void testCannotLockEntry(String baseDN) throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java index 1f3c62d980..1ddf3d544b 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/PasswordPolicyTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.core; @@ -4601,7 +4602,7 @@ public void testPasswordHistoryUsingCount() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testPasswordHistoryUsingDuration() throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java b/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java index fb2503c0c7..56c8385462 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java @@ -767,7 +767,7 @@ public void testShortCircuitModify() throws Exception } } - @Test(groups = "slow") + @Test public void testWriteLockModify() throws Exception { // We need the operation to be run in a separate thread because we are going diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/AttributeValuePasswordValidatorTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/AttributeValuePasswordValidatorTestCase.java index 061bbae18c..445db9cff9 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/AttributeValuePasswordValidatorTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/AttributeValuePasswordValidatorTestCase.java @@ -147,7 +147,7 @@ public Object[][] getValidConfigs() * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "validConfigs", groups= { "slow" }) + @Test(dataProvider = "validConfigs") public void testInitializeWithValidConfigs(Entry e) throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/CharacterSetPasswordValidatorTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/CharacterSetPasswordValidatorTestCase.java index 54efe99a9c..746fd89867 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/CharacterSetPasswordValidatorTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/CharacterSetPasswordValidatorTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.extensions; @@ -176,7 +177,7 @@ public Object[][] getValidConfigs() * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "validConfigs", groups = "slow") + @Test(dataProvider = "validConfigs") public void testInitializeWithValidConfigs(Entry e) throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/DefaultEntryCacheTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/DefaultEntryCacheTestCase.java index da2c861b8a..c6dc0317f4 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/DefaultEntryCacheTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/DefaultEntryCacheTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.extensions; @@ -404,7 +405,7 @@ public void cacheConcurrencyCleanup() throws Exception /** {@inheritDoc} */ - @Test(groups = { "slow", "testDefaultCacheConcurrency" }, + @Test(groups = { "testDefaultCacheConcurrency" }, threadPoolSize = 10, invocationCount = 10, timeOut = 60000) diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/FIFOEntryCacheTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/FIFOEntryCacheTestCase.java index 871b83a062..afc260e70c 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/FIFOEntryCacheTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/FIFOEntryCacheTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.extensions; @@ -285,7 +286,7 @@ public void cacheConcurrencyCleanup() /** {@inheritDoc} */ - @Test(groups = { "slow", "testFIFOCacheConcurrency" }, + @Test(groups = { "testFIFOCacheConcurrency" }, threadPoolSize = 10, invocationCount = 10, timeOut = 60000) diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SoftReferenceEntryCacheTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SoftReferenceEntryCacheTestCase.java index 97b671ceeb..b3ec1596a2 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/SoftReferenceEntryCacheTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/SoftReferenceEntryCacheTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.extensions; @@ -258,7 +259,7 @@ public void cacheConcurrencyCleanup() /** {@inheritDoc} */ - @Test(groups = { "slow", "testSoftRefCacheConcurrency" }, + @Test(groups = { "testSoftRefCacheConcurrency" }, threadPoolSize = 10, invocationCount = 10, timeOut = 60000) diff --git a/opendj-server-legacy/src/test/java/org/opends/server/extensions/TLSByteChannelTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/extensions/TLSByteChannelTestCase.java index 28376744dc..bcc39735f8 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/extensions/TLSByteChannelTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/extensions/TLSByteChannelTestCase.java @@ -12,6 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2012-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.extensions; @@ -41,7 +42,7 @@ import org.w3c.dom.NodeList; /** Tests for {@link TLSByteChannel} class. */ -@Test(groups = "slow", sequential = true) +@Test(sequential = true) public class TLSByteChannelTestCase extends DirectoryServerTestCase { /** Cipher suite hardcoded from the IANA registry on internet. */ diff --git a/opendj-server-legacy/src/test/java/org/opends/server/protocols/LDIFConnectionHandlerTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/protocols/LDIFConnectionHandlerTestCase.java index 6804693842..801798d977 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/protocols/LDIFConnectionHandlerTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/protocols/LDIFConnectionHandlerTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2014-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.protocols; @@ -62,7 +63,7 @@ public void startServer() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testValidUserLDIF() throws Exception { @@ -165,7 +166,7 @@ public void testValidUserLDIF() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testValidConfigLDIF() throws Exception { @@ -253,7 +254,7 @@ public void testValidConfigLDIF() * * @throws Exception If an unexpected problem occurs. */ - @Test(groups = "slow") + @Test public void testUnparseableLDIF() throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/protocols/jmx/PostConnectedDisconnectTest.java b/opendj-server-legacy/src/test/java/org/opends/server/protocols/jmx/PostConnectedDisconnectTest.java index cec63bd333..58046b7f13 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/protocols/jmx/PostConnectedDisconnectTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/protocols/jmx/PostConnectedDisconnectTest.java @@ -13,6 +13,7 @@ * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2014-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.protocols.jmx; @@ -91,7 +92,7 @@ public void afterClass() throws Exception * Perform a simple connect. * @throws Exception If something wrong occurs. */ - @Test(enabled = false, groups = "slow") + @Test public void checkPostConnectDisconnectPlugin() throws Exception { // Before the test, how many time postconnect and postdisconnect diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java index a59da13113..ebbcff79ce 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/DependencyTest.java @@ -13,6 +13,7 @@ * * Copyright 2007-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication; @@ -92,7 +93,7 @@ public void setup() throws Exception * Then test that the sequence of Delete necessary to remove * all those entries is also correctly ordered. */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void addModDelDependencyTest() throws Exception { ReplicationServer replServer = null; @@ -333,7 +334,7 @@ private void cleanDB() throws FileNotFoundException, IOException, Exception * has been added. * To increase the risks of failures a loop of add/del/add is done. */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void addDelAddDependencyTest() throws Exception { ReplicationServer replServer = null; @@ -438,7 +439,7 @@ private LDAPReplicationDomain startNewLDAPReplicationDomain(ReplicationServer re * Check that the dependency of moddn operation are working by * issuing a set of Add operation followed by a modrdn of the added entry. */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void addModdnDependencyTest() throws Exception { ReplicationServer replServer = null; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java index 890b8eb69b..ed0dd5a1ad 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java @@ -1071,7 +1071,7 @@ private void postTest() throws Exception * Test generationID saving when the root entry does not exist * at the moment when the replication is enabled. */ - @Test(dependsOnMethods = { "testMultiRS" }, groups = "slow") + @Test(dependsOnMethods = { "testMultiRS" }) public void testServerStop() throws Exception { String testCase = "testServerStop"; @@ -1112,7 +1112,7 @@ public void testServerStop() throws Exception * Loop opening sessions to the Replication Server * to check that it handle correctly disconnection and reconnection. */ - @Test(dependsOnMethods = { "testServerStop" }, groups = "slow") + @Test(dependsOnMethods = { "testServerStop" }) public void testLoop() throws Exception { String testCase = "testLoop"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/InitOnLineTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/InitOnLineTest.java index d1a5c00124..e2d0836b85 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/InitOnLineTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/InitOnLineTest.java @@ -13,6 +13,7 @@ * * Copyright 2006-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication; @@ -539,7 +540,7 @@ private int getReplServerPort(int replServerId) throws Exception * and test that, on S1 side, the task ends with an error. * State of the backend on S1 partially initialized: ? */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeImport() throws Exception { String testCase = "initializeImport "; @@ -590,7 +591,7 @@ public void initializeImport() throws Exception * - test that S1 has successfully exported the entries (by receiving them * on S2 side). */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeExport() throws Exception { String testCase = "initializeExport"; @@ -632,7 +633,7 @@ public void initializeExport() throws Exception * - wait task completed * - test that S2 has successfully received the entries */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeTargetExport() throws Exception { String testCase = "initializeTargetExport"; @@ -684,7 +685,7 @@ public void initializeTargetExport() throws Exception * * TODO: Error case: make S2 crash in the middle of the import and test what?? */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeTargetExportAll() throws Exception { String testCase = "initializeTargetExportAll"; @@ -736,7 +737,7 @@ public void initializeTargetExportAll() throws Exception /** * Tests the import side of the InitializeTarget task. */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeTargetImport() throws Exception { String testCase = "initializeTargetImport"; @@ -919,7 +920,7 @@ public void initializeBroken() throws Exception * connected to each replication server of the topology, thanks to the * ReplServerInfoMessage(s) exchanged by the replication servers. */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void testReplServerInfos() throws Exception { String testCase = "testReplServerInfos"; @@ -976,7 +977,7 @@ private Set getConnectedDSServerIds(ReplicationServer rs) return domain.getConnectedDSs().keySet(); } - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeTargetExportMultiSS() throws Exception { String testCase = "initializeTargetExportMultiSS"; @@ -1039,7 +1040,7 @@ private void waitForInitializeTargetMsg(String testCase, Assertions.assertThat(msgrcv).isInstanceOf(InitializeTargetMsg.class); } - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void initializeExportMultiSS() throws Exception { String testCase = "initializeExportMultiSS"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/ProtocolWindowTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/ProtocolWindowTest.java index 7878070215..eab1333ec9 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/ProtocolWindowTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/ProtocolWindowTest.java @@ -13,6 +13,7 @@ * * Copyright 2006-2009 Sun Microsystems, Inc. * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication; @@ -83,7 +84,7 @@ public class ProtocolWindowTest extends ReplicationTestCase * - receive all messages from the ReplicationBroker, check that * the client receives the correct number of operations. */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void saturateQueueAndRestart() throws Exception { logger.error(LocalizableMessage.raw("Starting Replication ProtocolWindowTest : saturateAndRestart")); diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/ReSyncTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/ReSyncTest.java index dc635b99a7..f8005f342b 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/ReSyncTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/ReSyncTest.java @@ -13,6 +13,7 @@ * * Copyright 2007-2009 Sun Microsystems, Inc. * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication; @@ -131,7 +132,7 @@ private ResultCode addEntry(String... ldif) throws Exception *
  • Check that entry has been added again in the LDAP server.
  • * */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void testResyncAfterRestore() throws Exception { // Delete the entry we are going to use to make sure that we do test something. @@ -178,7 +179,7 @@ public void testResyncAfterRestore() throws Exception *
  • Check that entry has been added again in the LDAP server.
  • * */ - @Test(enabled=true, groups="slow") + @Test(enabled=true) public void testResyncAfterImport() throws Exception { // delete the entry we are going to use to make sure that we do test something. diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java index a014b3c30c..117384b221 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java @@ -13,6 +13,7 @@ * * Copyright 2008-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.plugin; @@ -1096,7 +1097,7 @@ public void testSafeReadModeAck() throws Exception * Tests that a DS receiving an update from a RS in safe read mode effectively * sends an ack back (with or without error). */ - @Test(dataProvider = "rsGroupIdProvider", groups = "slow") + @Test(dataProvider = "rsGroupIdProvider") public void testSafeReadModeReply(byte rsGroupId) throws Exception { int TIMEOUT = 5000; @@ -1183,7 +1184,7 @@ public void testSafeReadModeReply(byte rsGroupId) throws Exception * Tests that a DS receiving an update from a RS in safe data mode does not * send back and ack (only safe read is taken into account in DS replay). */ - @Test(dataProvider = "rsGroupIdProvider", groups = "slow") + @Test(dataProvider = "rsGroupIdProvider") public void testSafeDataModeReply(byte rsGroupId) throws Exception { int TIMEOUT = 5000; @@ -1225,7 +1226,7 @@ public void testSafeDataModeReply(byte rsGroupId) throws Exception * DS performs many successive modifications in safe data mode and receives RS * acks with various errors. Check for monitoring right errors */ - @Test(groups = "slow") + @Test public void testSafeDataManyErrors() throws Exception { int TIMEOUT = 5000; @@ -1335,7 +1336,7 @@ private void assertBlockedForLessThanTimeout(long startTime, int TIMEOUT) * DS performs many successive modifications in safe read mode and receives RS * acks with various errors. Check for monitoring right errors */ - @Test(groups = "slow") + @Test public void testSafeReadManyErrors() throws Exception { int TIMEOUT = 5000; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java index 205acf44f1..8dc59bd4a2 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java @@ -13,6 +13,7 @@ * * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.plugin; @@ -190,7 +191,7 @@ public void testExcludePrecommit(int testProviderLineId, * Calls the testExclude test with a larger set of data, for nightly tests * purpose */ - @Test(dataProvider = "testExcludeNightlyProvider", groups = "slow") + @Test(dataProvider = "testExcludeNightlyProvider") public void testExcludeNightly(int testProviderLineId, String... fractionalConf) throws Exception { @@ -300,7 +301,7 @@ public void testIncludePrecommit(int testProviderLineId, * Calls the testInclude test with a larger set of data, for nightly tests * purpose */ - @Test(dataProvider = "testIncludeNightlyProvider", groups = "slow") + @Test(dataProvider = "testIncludeNightlyProvider") public void testIncludeNightly(int testProviderLineId, String... fractionalConf) throws Exception { @@ -802,7 +803,7 @@ public void testInitWithFullUpdateExcludePrecommit(int testProviderLineId, * Calls the testInitWithFullUpdateExclude test with a larger set of data, for nightly tests * purpose */ - @Test(dataProvider = "testInitWithFullUpdateExcludeNightlyProvider", groups = "slow") + @Test(dataProvider = "testInitWithFullUpdateExcludeNightlyProvider") public void testInitWithFullUpdateExcludeNightly(int testProviderLineId, boolean importedDomainIsFractional, String... fractionalConf) throws Exception { @@ -1038,7 +1039,7 @@ public void testInitWithFullUpdateIncludePrecommit(int testProviderLineId, * Calls the testInitWithFullUpdateExclude test with a larger set of data, for nightly tests * purpose */ - @Test(dataProvider = "testInitWithFullUpdateIncludeNightlyProvider", groups = "slow") + @Test(dataProvider = "testInitWithFullUpdateIncludeNightlyProvider") public void testInitWithFullUpdateIncludeNightly(int testProviderLineId, boolean importedDomainIsFractional, String... fractionalConf) throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/GroupIdHandshakeTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/GroupIdHandshakeTest.java index f38665072e..1da547174f 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/GroupIdHandshakeTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/GroupIdHandshakeTest.java @@ -13,6 +13,7 @@ * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.plugin; @@ -346,7 +347,7 @@ public void testRSWithSameGroupIds() throws Exception * - Change group id of DS1 and DS2 to 3 : they should reconnect to RS1 * @throws Exception If a problem occurred */ - @Test (groups = "slow") + @Test public void testRSWithManyGroupIds() throws Exception { String testCase = "testRSWithManyGroupIds"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java index 252144152f..15cd1dc224 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java @@ -13,6 +13,7 @@ * * Copyright 2006-2009 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.plugin; @@ -171,7 +172,7 @@ else if (rsPort == rs2Port) * * @throws Exception If a problem occurred */ - @Test(groups="slow") + @Test public void testFailOverMulti() throws Exception { String testCase = "testFailOverMulti"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java index 41b587ff60..fb42cea01e 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java @@ -13,6 +13,7 @@ * * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.plugin; @@ -421,7 +422,7 @@ private void checkRSConnectionsAndGenId(int[] rsIndexes, String msg) * Execute a full scenario with some RSs failovers and dynamic weight changes. * @throws Exception If a problem occurred */ - @Test (groups = "slow") + @Test public void testFailoversAndWeightChanges() throws Exception { String testCase = "testFailoversAndWeightChanges"; @@ -842,7 +843,7 @@ private void checkForCorrectNumbersOfConnectedDSs(int[][] possibleExpectedDSsNum * disconnections/reconnections after the very first connections. * @throws Exception If a problem occurred */ - @Test (enabled=true,groups = "slow") + @Test (enabled=true) public void testNoYoyo1() throws Exception { String testCase = "testNoYoyo1"; @@ -925,7 +926,7 @@ public void testNoYoyo1() throws Exception * disconnections/reconnections after the very first connections. * @throws Exception If a problem occurred */ - @Test (enabled=true, groups = "slow") + @Test (enabled=true) public void testNoYoyo2() throws Exception { String testCase = "testNoYoyo2"; @@ -1007,7 +1008,7 @@ public void testNoYoyo2() throws Exception * disconnections/reconnections after the very first connections. * @throws Exception If a problem occurred */ - @Test (enabled=true, groups = "slow") + @Test (enabled=true) public void testNoYoyo3() throws Exception { String testCase = "testNoYoyo3"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java index c899e16258..539fa3a1cd 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java @@ -13,6 +13,7 @@ * * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.plugin; @@ -285,7 +286,7 @@ public void testStateMachineBasic() throws Exception * ->NC->N->D->N->NC * @throws Exception If a problem occurred */ - @Test(enabled=true, groups="slow", dataProvider="stateMachineStatusAnalyzerTestProvider") + @Test(enabled=true, dataProvider="stateMachineStatusAnalyzerTestProvider") public void testStateMachineStatusAnalyzer(int thresholdValue) throws Throwable { String testCase = "testStateMachineStatusAnalyzer with threhold " + thresholdValue; @@ -401,7 +402,7 @@ private void waitForDegradedStatusOnBroker3() throws InterruptedException * ->NC->D->N->NC->N->D->NC->D->N->BG->NC->N->D->BG->FU->NC->N->D->FU->NC->BG->NC->N->FU->NC->N->NC * @throws Exception If a problem occurred */ - @Test(enabled = false, groups = "slow") + @Test(enabled = false) public void testStateMachineFull() throws Exception { String testCase = "testStateMachineFull"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java index 8886a673a3..d3748dc60c 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java @@ -13,6 +13,7 @@ * * Copyright 2008-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.server; @@ -1066,7 +1067,7 @@ private void assertReceivedAckedUpdates(final int expectedNbUpdates, * See testSafeDataLevelOne comment. * This is a facility to run the testSafeDataLevelOne in precommit in simplest * case, so that precommit run test something and is not long. - * testSafeDataLevelOne will run in nightly tests (groups = "slow") + * testSafeDataLevelOne will run in nightly tests () */ @Test(enabled = true) public void testSafeDataLevelOnePrecommit() throws Exception @@ -1125,7 +1126,7 @@ private Object[][] testSafeDataLevelOneProvider() * All possible combinations tested thanks to the provider */ @Test(dataProvider = "testSafeDataLevelOneProvider", - groups = { "slow", "opendj-256" }, + groups = { "opendj-256" }, enabled = true) public void testSafeDataLevelOne( int mainDsGid, boolean otherFakeDS, boolean fakeRS, @@ -1276,7 +1277,7 @@ private Object[][] testSafeDataLevelHighPrecommitProvider() /** * See testSafeDataLevelHigh comment. */ - @Test(dataProvider = "testSafeDataLevelHighPrecommitProvider", groups = "slow", enabled = true) + @Test(dataProvider = "testSafeDataLevelHighPrecommitProvider", enabled = true) public void testSafeDataLevelHighPrecommit(int sdLevel, boolean otherFakeDS, int otherFakeDsGid, long otherFakeDsGenId, int fakeRs1Gid, long fakeRs1GenId, int fakeRs1Scen, @@ -1386,7 +1387,7 @@ private Object[][] testSafeDataLevelHighNightlyProvider() /** * See testSafeDataLevelHigh comment. */ - @Test(dataProvider = "testSafeDataLevelHighNightlyProvider", groups = "slow", enabled = true) + @Test(dataProvider = "testSafeDataLevelHighNightlyProvider", enabled = true) public void testSafeDataLevelHighNightly(int sdLevel, boolean otherFakeDS, int otherFakeDsGid, long otherFakeDsGenId, int fakeRs1Gid, long fakeRs1GenId, int fakeRs1Scen, @@ -2013,7 +2014,7 @@ private Object[][] toDataProvider(List> listOfList) * Test that the RS is acking or not acking a safe data update sent from another * (fake) RS according to passed parameters. */ - @Test(dataProvider = "testSafeDataFromRSProvider", groups = "slow", enabled = true) + @Test(dataProvider = "testSafeDataFromRSProvider", enabled = true) public void testSafeDataFromRS(int sdLevel, int fakeRsGid, long fakeRsGenId, boolean sendInAssured) throws Exception { String testCase = "testSafeDataFromRS"; @@ -2365,7 +2366,7 @@ private Object[][] testSafeReadOneRSComplexPrecommitProvider() /** * See testSafeReadOneRSComplex comment. */ - @Test(dataProvider = "testSafeReadOneRSComplexPrecommitProvider", groups = "slow", enabled = true) + @Test(dataProvider = "testSafeReadOneRSComplexPrecommitProvider", enabled = true) public void testSafeReadOneRSComplexPrecommit(int otherFakeDsGid, long otherFakeDsGenId, int otherFakeDsScen, int otherFakeRsGid, long otherFakeRsGenId, int otherFakeRsScen) throws Exception { @@ -2416,9 +2417,9 @@ private Object[][] testSafeReadOneRSComplexProvider() *
      * All possible combinations tested thanks to the provider. *

      - * Note: it is working but disabled as 17.5 minutes to run + * Note: takes several minutes to run (240 combinations). */ - @Test(dataProvider = "testSafeReadOneRSComplexProvider", groups = "slow", enabled = false) + @Test(dataProvider = "testSafeReadOneRSComplexProvider", enabled = true) public void testSafeReadOneRSComplex(int otherFakeDsGid, long otherFakeDsGenId, int otherFakeDsScen, int otherFakeRsGid, long otherFakeRsGenId, int otherFakeRsScen) throws Exception { @@ -2984,7 +2985,7 @@ private Object[][] testSafeReadTwoRSsProvider() * Topology: * DS1---RS1---RS2---DS2 (DS2 with changing configuration) */ - @Test(dataProvider = "testSafeReadTwoRSsProvider", groups = "slow", enabled = true) + @Test(dataProvider = "testSafeReadTwoRSsProvider", enabled = true) public void testSafeReadTwoRSs(int fakeDsGid, long fakeDsGenId, int fakeDsScen) throws Exception { String testCase = "testSafeReadTwoRSs"; @@ -3102,7 +3103,7 @@ public void testSafeReadTwoRSs(int fakeDsGid, long fakeDsGenId, int fakeDsScen) * Topology: * DS1---RS1---DS2 (DS2 going degraded) */ - @Test(groups = "slow", enabled = true) + @Test(enabled = true) public void testSafeReadWrongStatus() throws Exception { String testCase = "testSafeReadWrongStatus"; diff --git a/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java index 618dad7218..ca9e0ddfe9 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/types/PrivilegeTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2007-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.types; @@ -956,7 +957,7 @@ private void assertPrivilege(InternalClientConnection conn, boolean hasPrivilege * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "testdata", groups = { "slow" }) + @Test(dataProvider = "testdata") public void testBackupBackend(InternalClientConnection conn, boolean hasPrivilege) throws Exception @@ -991,8 +992,7 @@ public void testBackupBackend(InternalClientConnection conn, * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "testdata", groups = { "slow" }, - dependsOnMethods = { "testBackupBackend" }) + @Test(dataProvider = "testdata", dependsOnMethods = { "testBackupBackend" }) public void testRestoreBackend(InternalClientConnection conn, boolean hasPrivilege) throws Exception @@ -1022,7 +1022,7 @@ public void testRestoreBackend(InternalClientConnection conn, * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "testdata", groups = { "slow" }) + @Test(dataProvider = "testdata") public void testLDIFExport(InternalClientConnection conn, boolean hasPrivilege) throws Exception @@ -1063,7 +1063,7 @@ public void testLDIFExport(InternalClientConnection conn, * * @throws Exception If an unexpected problem occurs. */ - @Test(dataProvider = "testdata", groups = { "slow" }) + @Test(dataProvider = "testdata") public void testLDIFImport(InternalClientConnection conn, boolean hasPrivilege) throws Exception @@ -1096,7 +1096,7 @@ public void testLDIFImport(InternalClientConnection conn, * and therefore the rebuild should succeed. * @throws Exception if an unexpected problem occurs. */ - @Test(dataProvider = "testdata", groups = { "slow" }) + @Test(dataProvider = "testdata") public void testRebuildIndex(InternalClientConnection conn, boolean hasPrivilege) throws Exception diff --git a/opendj-server-legacy/src/test/java/org/opends/server/util/CertificateManagerTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/util/CertificateManagerTestCase.java index 2e095646de..013ed48bb7 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/util/CertificateManagerTestCase.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/util/CertificateManagerTestCase.java @@ -13,6 +13,7 @@ * * Copyright 2008-2010 Sun Microsystems, Inc. * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.util; @@ -829,7 +830,7 @@ public void testGenerateSelfSignedCertificateJKS(KeyType keyType) * * @throws Exception If a problem occurs. */ - @Test(groups="slow", dataProvider="keyTypes") + @Test(dataProvider="keyTypes") public void testGenerateSelfSignedCertificatePKCS12(KeyType keyType) throws Exception { diff --git a/opendj-server-legacy/src/test/java/org/opends/server/util/TestCrypt.java b/opendj-server-legacy/src/test/java/org/opends/server/util/TestCrypt.java index e78d29219e..97461e0d4a 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/util/TestCrypt.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/util/TestCrypt.java @@ -14,6 +14,7 @@ * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2007 Brighton Consulting, Inc. * Portions Copyright 2014-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.util; @@ -28,10 +29,10 @@ /** * This class defines a set of tests for the {@link org.opends.server.util.Crypt} class. *

      - * In the "slow" group, since they are unlikely to break and since there are 4K+ they can take a + * Historically in the "slow" group, since they are unlikely to break and since there are 4K+ they can take a * while */ -@Test(groups = { "slow" }, sequential = true) +@Test(sequential = true) public final class TestCrypt extends UtilTestCase { private Crypt crypt = new Crypt(); From 6af966d6d620222ddcb36c803496c66761054315 Mon Sep 17 00:00:00 2001 From: Valera V Harseko Date: Sun, 5 Jul 2026 09:07:59 +0300 Subject: [PATCH 2/3] Drop the now-unused slow group exclusion from the failsafe config Once the whole series of slow-group pull requests is merged, no test carries the "slow" TestNG group anymore, so the excludegroups filter is dead configuration. This makes this pull request the last one of the series to merge: applying it before the others would prematurely enable the not-yet-fixed slow tests still present in their files. --- opendj-server-legacy/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml index 19904ec345..bbd760b25d 100644 --- a/opendj-server-legacy/pom.xml +++ b/opendj-server-legacy/pom.xml @@ -1281,10 +1281,6 @@ listener org.opends.server.TestListener - - excludegroups - slow - configfailurepolicy skip From 17873c84a7cb7ead104b1d20f456ee6a785a065c Mon Sep 17 00:00:00 2001 From: Valera V Harseko Date: Sun, 5 Jul 2026 22:17:37 +0300 Subject: [PATCH 3/3] Wait for RS peers to finish changelog catch-up in assured replication tests A freshly connected peer starts in catch-up mode: until its server writer has checked there is nothing to recover from the changelog DB, updates are re-read from the DB and keep the assured flag of the original sender - the NotAssuredUpdateMsg substitution only applies to the in-memory queue path. An update sent by the test in that window reaches fake DSs/RSs with unexpected assured parameters and fails checkUpdateAssuredParameters(). This is why testSafeDataLevelOne and testSafeReadOneRSComplex failed stochastically on every CI job while passing locally. waitForStableTopo() now also waits until every peer connected to the real RS is "following" (new package-private MessageHandler.isFollowing() accessor), and testSafeDataLevelOne now calls it before sending updates. 357/357 green locally in ~21 min. --- .../replication/server/MessageHandler.java | 19 +++++++ .../server/AssuredReplicationServerTest.java | 50 ++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MessageHandler.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MessageHandler.java index 6b3f1e87fc..6e280e83c2 100644 --- a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MessageHandler.java +++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/MessageHandler.java @@ -13,6 +13,7 @@ * * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyright 2026 3A Systems, LLC */ package org.opends.server.replication.server; @@ -206,6 +207,24 @@ public MonitorData getMonitorData() return attributes; } + /** + * Indicates whether this handler is served from the in-memory message + * queue, i.e. it is done catching up with the changelog DB. + *

      + * Package private: allows tests to wait until a freshly connected peer + * will receive published updates through the in-memory queue path rather + * than re-read from the changelog DB. + * + * @return true when this handler follows the in-memory message queue + */ + boolean isFollowing() + { + synchronized (msgQueue) + { + return following; + } + } + /** * Retrieves the name of this monitor provider. It should be unique among all * monitor providers, including all instances of the same monitor provider. diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java index d3748dc60c..dd602dce86 100644 --- a/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java +++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/server/AssuredReplicationServerTest.java @@ -1188,8 +1188,12 @@ public void testSafeDataLevelOne( false, AssuredMode.SAFE_DATA_MODE, 1, TIMEOUT_RS_SCENARIO); } - // Send update from DS 1 + // Wait for connections to be finished + // DS must see expected numbers of fake DSs and RSs final FakeReplicationDomain fakeRd1 = fakeRDs[1]; + waitForStableTopo(fakeRd1, otherFakeDS ? 1 : 0, fakeRS ? 2 : 1); + + // Send update from DS 1 long startTime = System.currentTimeMillis(); fakeRd1.sendNewFakeUpdate(); @@ -1893,6 +1897,7 @@ private void waitForStableTopo(FakeReplicationDomain fakeRd, int expectedDs, if (dsInfo.size() == expectedDs && rsInfo.size() == expectedRs) { debugInfo("waitForStableTopo: expected topo obtained after " + nSec + " second(s)."); + waitForAllConnectedPeersFollowing(); return; } Thread.sleep(100); @@ -1903,6 +1908,49 @@ private void waitForStableTopo(FakeReplicationDomain fakeRd, int expectedDs, " DSs (had " + dsInfo +") and " + expectedRs + " RSs (had " + rsInfo +")."); } + /** + * Wait until every peer connected to the real RS is served from the RS + * in-memory message queue ("following") rather than catching up from the + * changelog DB. A freshly connected peer always starts in catch-up mode: + * until its server writer has checked there is nothing to recover from the + * changelog DB, updates are re-read from the DB and keep the assured flag + * of the original sender, while the NotAssuredUpdateMsg substitution + * performed by ReplicationServerDomain only applies to the in-memory queue + * path. An update sent by the test while a peer is still catching up may + * thus reach it with unexpected assured parameters and break + * checkUpdateAssuredParameters(). This regularly happens on slow (CI) + * machines. + */ + private void waitForAllConnectedPeersFollowing() throws Exception + { + final ReplicationServerDomain domain = + rs1.getReplicationServerDomain(DN.valueOf(TEST_ROOT_DN_STRING)); + assertNotNull(domain); + long nSec = 0; + long startTime = System.currentTimeMillis(); + do + { + boolean allFollowing = true; + for (ServerHandler handler : domain.getConnectedDSs().values()) + { + allFollowing &= handler.isFollowing(); + } + for (ServerHandler handler : domain.getConnectedRSs().values()) + { + allFollowing &= handler.isFollowing(); + } + if (allFollowing) + { + debugInfo("waitForAllConnectedPeersFollowing: all peers following after " + nSec + " second(s)."); + return; + } + Thread.sleep(100); + nSec = (System.currentTimeMillis() - startTime) / 1000; + } + while (nSec < 30); + Assert.fail("Some peers connected to the real RS did not catch up with the changelog DB in time"); + } + /** * Compute the list of servers that are eligible for receiving a safe data assured update * according to their group id and generation id.