Skip to content

tests: await embedded ZooKeeper before loading service contexts - #8340

Open
greenc-FNAL wants to merge 1 commit into
masterfrom
build/webdav-context-readiness
Open

greenc-FNAL wants to merge 1 commit into
masterfrom
build/webdav-context-readiness

Conversation

@greenc-FNAL

Copy link
Copy Markdown
Contributor

Motivation

The shared service-context test fixture starts an embedded ZooKeeper client and immediately loads the Spring context. Service initialization can race the client's connection, making context tests fail intermittently.

Modification

Wait up to five seconds for the embedded Curator client to connect before loading the context. Start and wait inside the existing cleanup-protected block, and report an IOException containing the in-process endpoint if readiness times out. Only the shared test fixture changes; production service startup and configuration are unchanged.

Result

Context construction has an explicit readiness condition rather than relying on scheduling. This branch contains only this fixture patch and targets master independently of the curator and FTP PRs.

Validation and prerequisite

The sole signed topic commit is bc1561cf708cb213902104a6eb317710a36cda43, based on dbb4fb0fe4236d25c8e993d92d3548d07f7bc005. Its patch matches the previously qualified WebDAV patch exactly, as verified with git range-diff.

The local Maven 3.10 root reactor currently rejects the existing duplicate frontend dependency before tests run, even when selecting WebDAV. The independent baseline fix is #8339. This PR remains draft pending that foundation and requalification against its actual landed state; #8339's patch is deliberately not included in this PR's diff.

Qualification used a local prefix containing only master at the stated SHA, the curator deduplication patch, and this WebDAV fixture patch:

mvn -q -B -ntp -U -am clean test-compile -pl modules/dcache-webdav
mvn -q -B -ntp -U -am test -pl modules/dcache-webdav -DskipTests=false -Dtest=WebdavDoorContextTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -q -B -ntp -U -am package -pl modules/dcache-webdav -DskipTests=false

Clean compilation passed. Two focused context runs and the context run in the full selected package/test reactor passed (10 context tests each). The WebDAV module ran 120 tests with zero failures, errors, or skips. These are qualification-prefix results, not a claimed standalone-root pass before #8339 lands. No deployed-door, external ZooKeeper, or live identity-provider qualification is claimed.

@greenc-FNAL
greenc-FNAL marked this pull request as ready for review December 3, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant