USACE / USACE/cwms-data-api

Improve integration Test environment initialization

Open
#1,480 3 comments 0 reactions 1 assignee View on GitHub

@MikeNeilson is already working on this.

Since Nov 20, 2025.

priority:high
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

During #1474 it was attempted to dynamically discover the database version from the database to render as the displayname. However, due to the order of operations (the CdaSetupCallbackExtension doesn't run before test discovery) this fails.

After a search of junit lifecycle operations there is a LauncherSessionListener available https://docs.junit.org/current/api/org.junit.platform.launcher/org/junit/platform/launcher/LauncherSessionListener.html

This runs before test discovery and actual startup/other initialization settings should be handle here.

The current extension, if it works out, will be expanded to implement the launcher session listener to start the database. Will also include appropriate renentrant locks, it would be nice to run these tests in parallel, the time to finish is getting rediculous.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.