Skip to content

CIRC-2633: Fix flaky tests#1680

Merged
zakletskyi-epam merged 3 commits into
masterfrom
fix-failing-tests
Jul 10, 2026
Merged

CIRC-2633: Fix flaky tests#1680
zakletskyi-epam merged 3 commits into
masterfrom
fix-failing-tests

Conversation

@zakletskyi-epam

@zakletskyi-epam zakletskyi-epam commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fix flaky HoldShelfExpirationDateTests that fail on CI when JVM class-loading and test execution happen across a midnight UTC boundary.

Approach

  • CalendarExamples — for CASE_CURRENT_CLOSE_SERVICE_POINT_ID, the calendar period is now built dynamically from the date query parameter instead of the statically captured class-load date. This also keeps correctness for tests that use cd5–cd8 without a fake clock (e.g. RequestsAPICreationTests).
  • HoldShelfExpirationDateTests.setUp() — fake clock is pinned to CASE_CURRENT_DATE_CLOSE (the real date captured at class-load time) so the server-side logic and calendar data stay in sync.
  • isSameDay() — replaced LocalDate.now() with the fake clock via getZonedDateTime().

TODOS and Open Questions

  • Check logging

Learning

CIRC-2633

@zakletskyi-epam zakletskyi-epam force-pushed the fix-failing-tests branch 3 times, most recently from db0f394 to bbd26d0 Compare July 8, 2026 10:23
@zakletskyi-epam zakletskyi-epam marked this pull request as ready for review July 8, 2026 11:06
@zakletskyi-epam zakletskyi-epam changed the title Fix flaky tests chore(tests): Fix flaky tests Jul 8, 2026
@zakletskyi-epam zakletskyi-epam changed the title chore(tests): Fix flaky tests CIRC-2633: Fix flaky tests Jul 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@zakletskyi-epam zakletskyi-epam merged commit d4570fc into master Jul 10, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants