Skip to content

Fix and enable broken tests from the slow group - #686

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:features/slow-tests-fixes
Jul 8, 2026
Merged

Fix and enable broken tests from the slow group#686
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:features/slow-tests-fixes

Conversation

@vharseko

Copy link
Copy Markdown
Member

Context

The TestNG slow group is excluded from CI (excludegroups=slow in the failsafe configuration), so these tests have rotted. A full audit of the group found four broken tests in three classes — all test-code defects, no product bugs involved.

Fixes

  • UpdateOperationTest.modifyConflicts asserted that Entry.getAllAttributes() returns null for an absent attribute, but it returns an empty list since the Entry API refactoring, so the assert could never pass; the conflict resolution itself works. Assert an empty list instead.
  • UpdateOperationTest.namingConflicts read the resolved-naming-conflicts monitor counter right after publishing a DELETE with a wrong entryUUID. Unlike the other scenarios in this test, the preceding getEntry() does not wait for the replay because the entry already exists, so the check raced with the replay thread. Poll the counter with TestTimer (same pattern already used elsewhere in the file).
  • TopologyViewTest relied on fixed sleeps for topology propagation and compared the view exactly once; one second is not always enough for a newly started RS to appear in the DS view (RS 52 was missing from the actual view in STEP 3). Poll the topology view with TestTimer inside checkTopoView.
  • TestRebuildTask rebuilt the dn2uri index, which only existed in the legacy local DB backend; the JE backend rightfully rejects it ("There is no index configured for attribute type 'dn2uri'"), so the task ended STOPPED_BY_ERROR. Drop dn2uri and keep dn2id.

All four tests are moved out of the slow group into the default build (~1.5 minutes for the three classes).

Verification

Under the default CI group filter: UpdateOperationTest 8/8 (40s), TopologyViewTest 1/1 (33s), TestRebuildTask 3/3 (18.5s). The two formerly race-prone classes were re-run twice more — all green.

These tests are excluded from CI (excludegroups=slow) and have rotted:
- UpdateOperationTest.modifyConflicts asserted that
Entry.getAllAttributes() returns null for an absent attribute, but it
returns an empty list since the Entry API refactoring; the conflict
resolution itself works. Assert an empty list instead.
- UpdateOperationTest.namingConflicts read the resolved-naming-conflicts
monitor counter right after publishing a DELETE with a wrong
entryUUID. Unlike the other scenarios, the preceding getEntry() does
not wait for the replay because the entry already exists, so the
check raced with the replay thread. Poll the counter with TestTimer.
- TopologyViewTest relied on fixed sleeps for topology propagation and
compared the view exactly once; 1 second is not always enough for a
newly started RS to appear in the DS view. Poll the topology view
with TestTimer inside checkTopoView.
- TestRebuildTask rebuilt the dn2uri index, which only existed in the
legacy local DB backend; the JE backend rightfully rejects it. Drop
dn2uri and keep dn2id.
Move all four tests out of the "slow" group into the default build
(~1.5 minutes for the three classes).
@vharsekovharseko added tests Test suites: fixing, enabling, un-disabling replication labels Jul 6, 2026
@vharseko
vharseko merged commit f872566 into OpenIdentityPlatform:masterJul 8, 2026
17 checks passed
@vharseko
vharseko deleted the features/slow-tests-fixes branch July 8, 2026 16:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugCIreplicationtestsTest suites: fixing, enabling, un-disabling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vharseko@maximthomas