Skip to content

test(competition): pin leaderboard retention clock - #295

Open
kcrmin wants to merge 1 commit into
developfrom
test/leaderboard-window-clock
Open

kcrmin wants to merge 1 commit into
developfrom
test/leaderboard-window-clock

Conversation

@kcrmin

@kcrmin kcrmin commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What and why

AnonymousLeaderboardJooqAdapter hides an ENDED room once ended_at + interval '1 year' is no longer after the database clock. Four persistence test classes seeded ENDED rooms on fixed 2026 dates, so 16 of their 17 tests would fail from 2027-08-02 (2027-08-10 for the settlement test).

Each test timeline now starts 30 days before today (UTC) at its original time of day, so the seeded rooms always end inside the window. A new test checks that public rooms, and secret rooms with access granted, stay hidden once they ended more than a year ago. Production code is unchanged.

Verification

  • Moving the old fixed dates back one year reproduced the 16 failures.
  • The four classes pass: 18 tests, 0 failures. With the window widened to 100 years, the new test fails.
  • Full ./gradlew test --no-daemon --parallel --no-build-cache: the only failures are 2 in AccountClosurePersistenceIntegrationTest. With that fix applied as well: 1055 tests, 0 failures, 1 existing skip.

Related: #294 (the AccountClosure fix; merge it first).

Seed ended rooms 30 days before today, inside the one-year window.
Add a test that rooms ended over a year ago stay hidden.
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