Skip to content

Add unit tests for time accounting utilities - #49

Merged
slominskir merged 1 commit into
mainfrom
codex/add-unit-tests
Oct 28, 2026
Merged

slominskir merged 1 commit into
mainfrom
codex/add-unit-tests

Conversation

@slominskir-coding-agent

@slominskir-coding-agent slominskir-coding-agent Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

BTM had no unit test suite. Add JUnit 5 to the Gradle build and 60 test cases covering experimenter shift boundaries and daylight saving changes, hourly subset selection and gap filling with database precedence over EPICS, and EPICS rounding thresholds, shared OFF accounting, and physics corrections.

Run the suite with ./gradlew test; it also runs during ./gradlew build. Tests use synthetic in-memory records and a fixed America/New_York timezone, requiring no Oracle, WildFly or EPICS services. Update the development instructions to document the suite. No deployment steps are required.

Checks

  • ./gradlew spotlessApply build --console=plain — passed, including compilation, WAR packaging, formatting checks and all 60 tests (0 failures, 0 errors, 0 skipped).
  • git diff --check — passed.
  • GitHub CI build — passed on a61b9ea.
  • CodeQL analysis — all checks passed.

Decisions

Use characterization tests for existing time-accounting behavior and keep application code unchanged. Select service-independent logic so tests run locally and in the existing Gradle CI workflow without provisioning integrations.

Prepared-by: OpenAI Codex:GPT-6

Configure JUnit 5 and add 60 test cases for experimenter shift boundaries and daylight saving changes, hourly source selection and gap filling, and EPICS rounding thresholds and corrections. Document the test command and fixed test timezone.

Assisted-by: Codex:GPT-6
@slominskir-coding-agent slominskir-coding-agent Bot added the source::ai Work done by an AI agent label Oct 28, 2026
@slominskir
slominskir merged commit 1af8bbd into main Oct 28, 2026
5 checks passed
@slominskir
slominskir deleted the codex/add-unit-tests branch October 28, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source::ai Work done by an AI agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant