Skip to content

Backport SessionScheduleTest coverage for previous-day start-of-week handling#1225

Draft
Copilot wants to merge 7 commits into
masterfrom
copilot/rework-sessionschedule-util-time
Draft

Backport SessionScheduleTest coverage for previous-day start-of-week handling#1225
Copilot wants to merge 7 commits into
masterfrom
copilot/rework-sessionschedule-util-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

This PR copies over the missing SessionScheduleTest case covering a schedule that starts in one timezone/day context and ends in another. It preserves regression coverage for StartDay resolution when locale week boundaries can shift how the session window is interpreted.

  • Added regression coverage

    • Backports testSessionStartInPreviousDayOfWeek() into quickfixj-core/src/test/java/quickfix/SessionScheduleTest.java.
    • Covers a session configured with:
      • StartTime=13:00:00 Australia/Victoria
      • StartDay=Sunday
      • EndTime=17:00:00 America/New_York
      • EndDay=Saturday
  • Edge case under test

    • Exercises locale-sensitive week-start behavior using Locale("en", "AU").
    • Verifies DefaultSessionSchedule.isSessionTime() remains correct when the effective session start can resolve into the previous day-of-week.
  • Why this matters

    • Keeps this PR aligned with the upstream regression coverage for cross-timezone session scheduling.
    • Protects against behavior differences across JDK/locale combinations that affect weekday interpretation.
Locale.setDefault(new Locale("en", "AU"));

settings.setString(Session.SETTING_START_TIME, "13:00:00 Australia/Victoria");
settings.setString(Session.SETTING_START_DAY, "Sunday");
settings.setString(Session.SETTING_END_TIME, "17:00:00 America/New_York");
settings.setString(Session.SETTING_END_DAY, "Saturday");

assertEquals(true, schedule.isSessionTime());

Copilot AI and others added 6 commits May 16, 2026 08:54
@chrjohn
Copy link
Copy Markdown
Member

chrjohn commented May 16, 2026

@copilot LogUtilTest.testLogThrowable:51 fails

Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/6e680b34-2576-43e6-8a75-bcadbffdd3df

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 16, 2026

@copilot LogUtilTest.testLogThrowable:51 fails

Fixed in 3ea3d92 by updating LogUtilTest to throw from getCreationTime(), which is the MessageStore method the current session path uses. I also re-ran LogUtilTest and SessionScheduleTest locally and both pass.

Copilot AI requested a review from chrjohn May 16, 2026 20:58
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.

2 participants