Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Problem

Related to PR #1124, we need a unit test that demonstrates the current behavior where Reject messages are NOT resent during a ResendRequest. According to the FIX specification, Reject messages should be the only session-level messages that are resent, but the current implementation does not resend them.

Task

Create a unit test in quickfixj-core/src/test/java/quickfix/SessionTest.java that:

  1. Sets up a session with default settings (forceResendWhenCorruptedStore=false)
  2. Stores a Reject message (MsgType=3) in the message store along with other message types
  3. Stores some application messages as well for comparison
  4. Triggers a ResendRequest for the range that includes the Reject message
  5. Verifies the current buggy behavior:
    • Reject messages are NOT resent (they are skipped with SequenceReset GapFill)
    • Application messages ARE resent correctly
    • Other session-level messages (Logon, Heartbeat, etc.) are NOT resent

Expected Test Behavior

This test should PASS with the current code (demonstrating the bug exists), showing that:

  • Reject messages are currently being skipped during resend (incorrect behavior)
  • A SequenceReset GapFill is sent instead of the Reject message

After PR #1124 is merged, this test will need to be updated to verify that Reject messages ARE correctly resent.

Implementation Details

The test should:

  • Use the existing SessionTest infrastructure and helper methods
  • Create a Reject message using the FIX message factory (MsgType.REJECT = "3")
  • Store messages in the message store using messageStore.set(seqNum, messageString)
  • Trigger a ResendRequest and capture the sent messages
  • Assert that a SequenceReset GapFill is sent for the Reject message sequence number
  • Assert that the Reject message itself is not in the resent messages

File to Modify

  • quickfixj-core/src/test/java/quickfix/SessionTest.java - Add the new test method

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@chrjohn chrjohn closed this Jan 28, 2026
@chrjohn chrjohn deleted the copilot/add-unit-test-reject-message-behavior branch January 28, 2026 19:01
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