-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix oom. if config resendRequestChunkSize. Loading data is batch #777
base: master
Are you sure you want to change the base?
Changes from 5 commits
17a1774
628baa0
e0c1d9e
e47e651
5a18e39
b96e9b3
074f73c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3145,4 +3145,47 @@ public void testSend_ShouldKeepPossDupFlagAndOrigSendingTime_GivenAllowPosDupCon | |
assertTrue(sentMessage.getHeader().isSetField(PossDupFlag.FIELD)); | ||
assertTrue(sentMessage.getHeader().isSetField(OrigSendingTime.FIELD)); | ||
} | ||
|
||
|
||
@Test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this test do if you roll back your changes in the Session class? To me it looks like it just tests your session builder. But to be honest I am only looking at it on my mobile not IDE, so maybe I'm missing something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know what you mean |
||
public void testSessionWithResendRequestChunkSizeAndEnableNextExpectedMsgSeqNum() throws Exception { | ||
final UnitTestApplication application = new UnitTestApplication(); | ||
|
||
final SessionID sessionID = new SessionID( | ||
FixVersions.BEGINSTRING_FIX44, "SENDER", "TARGET"); | ||
try (Session session = createSession(sessionID, application, true, | ||
true, false,10,true)) { | ||
|
||
final UnitTestResponder responder = new UnitTestResponder(); | ||
session.setResponder(responder); | ||
|
||
session.logon(); | ||
session.next(); | ||
|
||
final Message logonRequest = new Message(responder.sentMessageData); | ||
Message logonResponse = createLogonResponse(sessionID, logonRequest, 1); | ||
// config Field NextExpectedMsgSeqNum=1 | ||
logonResponse.setField(new NextExpectedMsgSeqNum(1)); | ||
session.next(logonResponse); | ||
|
||
assertEquals( | ||
1, | ||
application.lastToAdminMessage().getHeader() | ||
.getInt(MsgSeqNum.FIELD)); | ||
assertEquals(2, session.getStore().getNextTargetMsgSeqNum()); | ||
assertEquals(2, session.getStore().getNextSenderMsgSeqNum()); | ||
|
||
session.next(createHeartbeatMessage(1002)); | ||
assertNotEquals(ResendRequest.MSGTYPE, application | ||
.lastToAdminMessage().getHeader().getString(MsgType.FIELD)); | ||
|
||
session.next(createHeartbeatMessage(1003)); | ||
assertNotEquals(ResendRequest.MSGTYPE, application | ||
.lastToAdminMessage().getHeader().getString(MsgType.FIELD)); | ||
|
||
session.next(createHeartbeatMessage(1001)); | ||
assertNotEquals(ResendRequest.MSGTYPE, application | ||
.lastToAdminMessage().getHeader().getString(MsgType.FIELD)); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please check that you don't use strange characters in the source code, e.g. as after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, what I optimized was the problem of overloading at one time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you asking me to remove comments from the code?