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

Valery Kharseko
12 hours ago e0e1e42df98bdb3bff8dfd69daaaa321e7f8efb4
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Wednesday, November 18, 2026 07:42 +0100
committer GitHub <noreply@github.com>
Wednesday, November 18, 2026 07:42 +0100
commite0e1e42df98bdb3bff8dfd69daaaa321e7f8efb4
tree b210186ee1d19f3cf5be5354943f02b7df992238 tree | zip | gz
parent 7be21fdb29a1d8a18e14e1a90d21b9d5215bf511 view | diff
[#1305] Wait for replication generation IDs to converge (#1306)

## Problem

`ReplicationDomainTest.publishAndReceive` checks the replication server
generation IDs 500 ms after resetting the replication log. The reset and
the resulting topology messages are asynchronous, and
`checkGenerationID()` accepts `-1`, so the check can still see `-1` even
though the reset to `2` is in progress.

## Change

Wait up to 30 seconds for both expected replication servers to appear in
the directory server's topology with generation ID `2`, and for both
replication servers to hold `2` themselves. A missing server or a
generation ID that never converges still fails the test.

Fixes #1305

## Validation

- `ReplicationDomainTest`: 40 tests passed on macOS / JDK 21, with no
failures or skips.
- A temporary diagnostic delayed the handling of reset to `2` by 1.5
seconds. The original 500 ms check reproduced the reported failure; the
updated test passed after the reset and topology converged.
- A temporary diagnostic discarded reset to `2`. The updated test failed
after the bounded wait with the generation ID still at `-1`.
- `git diff --check` passed.

The diagnostics demonstrate a sufficient timing mechanism, not the exact
CI interleaving.
1 files modified
25 ■■■■■ changed files
opendj-server-legacy/src/test/java/org/opends/server/replication/service/ReplicationDomainTest.java 25 ●●●●● diff | view | raw | blame | history