Add failing test for ResendRequest not re-sent after failed send (issue #1114)#1117
Draft
Add failing test for ResendRequest not re-sent after failed send (issue #1114)#1117
Conversation
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add failing unit test for resend request bug
Add failing test for ResendRequest not re-sent after failed send (issue #1114)
Jan 14, 2026
chrjohn
requested changes
Jan 15, 2026
quickfixj-core/src/test/java/quickfix/SessionResendRequestFailureTest.java
Outdated
Show resolved
Hide resolved
quickfixj-core/src/test/java/quickfix/SessionResendRequestFailureTest.java
Outdated
Show resolved
Hide resolved
quickfixj-core/src/test/java/quickfix/SessionResendRequestFailureTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
chrjohn
reviewed
Jan 16, 2026
| // Step 5: Disconnect and reconnect | ||
| session.disconnect("Simulating disconnect", false); | ||
| assertFalse("Session should be disconnected", session.isLoggedOn()); | ||
|
|
Member
There was a problem hiding this comment.
@copilot the test does not exactly follow the description.
We need a call to Session.generateResendRequest() here, which will in turn trigger sendRaw() which will in turn set the resendRange and show the problematic behaviour.
Contributor
Author
There was a problem hiding this comment.
Updated in commit f910c2f. The test now calls Session.generateResendRequest() directly using reflection after disconnect, which triggers sendResendRequest() → sendRaw() (fails) → state.setResendRange() (still called), demonstrating the bug exactly as described.
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
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.
Add failing test for ResendRequest bug #1114
Session.generateResendRequest()using reflectioncallGenerateResendRequest()helper method to invoke the private method via reflectionsendResendRequest()callssendRaw()and then sets ResendRange regardless ofsendRaw()return valueTest Status
✅ Test successfully demonstrates the bug
Session.generateResendRequest()which triggers:generateResendRequest()→sendResendRequest()→sendRaw()(returns false) →state.setResendRange()(still called!)Session.sendResendRequest()Original prompt
Context
This PR adds a failing unit test to demonstrate the bug reported in issue #1114: #1114
Problem Summary:
When a QuickFIX session disconnects after a ResendRequest is triggered but before it's actually sent (because
responderbecomes null), theResendRangeis still marked as "sent" even thoughsendRaw()returnsfalse. On reconnection, the ResendRequest is never re-sent because the engine thinks it was already sent.Task
Create a new test file
quickfixj-core/src/test/java/quickfix/SessionResendRequestFailureTest.javawith the following content: