Repository navigation
Add unit tests for time accounting utilities - #49
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fixedAmerica/New_Yorktimezone, 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.a61b9ea.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