Conversation
Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenDJ/sessions/eec9766f-4368-411e-ad4f-0feb859fa609 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Base automatically changed from
copilot/update-github-actions-versions
to
master
April 2, 2026 13:39
…gthen domain wait, increase timeouts Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenDJ/sessions/fcf7e435-1019-477d-9285-b3b182966527 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add getNumRSs method to ReplicationServerDomain
Fix intermittent GenerationIdTest.testMultiRS race condition on RS-to-RS topology
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
testMultiRSfails intermittently withreplServer2reporting generation ID-1instead of48becausewaitForDomainsOnAllReplicationServers()only verified domain object existence — not that RS-to-RS connections were actually established — so generation ID propagation hadn't completed when assertions ran.Changes
ReplicationServerDomain— addgetNumRSs()convenience method returningconnectedRSs.size()waitForDomainsOnAllReplicationServers()— strengthen the wait condition to assert each RS has≥ 2connected peer RSs (viagetNumRSs()), guaranteeing the full 3-RS mesh is up before proceeding; increase timeout 30 s → 60 swaitForStableGenerationId()— increase timeout 60 s → 120 s for slow CI runnersOriginal prompt
Problem
The
GenerationIdTest.testMultiRStest is failing intermittently in CI with:The failure trace is:
Root cause
The
waitForDomainsOnAllReplicationServers()method at line 993-1009 ofGenerationIdTest.javaonly checks that theReplicationServerDomainobject exists on each replication server, but does NOT verify that the RS-to-RS connections are fully established. As a result, whenwaitForStableGenerationId(EMPTY_DN_GENID)is called on line 927, the generation ID has not yet propagated from RS1 to RS2 because the inter-RS connections haven't been completed yet.Required changes
1. Add
getNumRSs()method toReplicationServerDomainFile:
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServerDomain.javaAdd a new public method
getNumRSs()that returns the number of connected replication servers. The class already has aconnectedRSsfield (ConcurrentHashMap<Integer, ReplicationServerHandler>) at line 125, and agetConnectedRSs()method at line 2134 that returns the map. Add a convenience method:Place this method right after the existing
getConnectedRSs()method (after line 2137).2. Strengthen
waitForDomainsOnAllReplicationServers()in the testFile:
opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.javaModify the
waitForDomainsOnAllReplicationServers()method (lines 993-1009) to:getNumRSs()methodThe updated method should look like:
3. Increase timeout in
waitForStableGenerationId()File:
opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.javaAt line 1013, increase the
maxSleepfrom 60 seconds to 120 seconds to account for slow CI environments:Files to modify
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServerDomain.java— addgetNumRSs()method after line 2137opendj-server-legacy/src/test/java/org/opends/server/replication/GenerationIdTest.java— updatewaitForDomainsOnAllReplicationServers()(lines 993-1009) andwaitForStableGenerationId()(line 1013)The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant:
I'll start by fetching the job logs and the workflow definition to understand the failure.
Assistant: ## Failing Test Analysis
The build fails due to a single test failure in
GenerationIdTest.testMultiRS:Root Cause
The failure occurs at [line 927 → 1017 → 1033](https://github.com/OpenIdentityPlatform/OpenDJ/blob/930998062a181860ef20b4d3b081f696ae97ecb9/opendj-s...
This pull request was created from Copilot chat.