Permalink
Browse files

Merge pull request #94 from valotrading/features/print-invalid-logon-…

…message

Print message when expecting logon
  • Loading branch information...
2 parents 98e22e4 + 4c4c607 commit e89d69cea031a32f3b5c7a1fc2d289e3eceeb72f @penberg penberg committed Jan 22, 2013
@@ -396,7 +396,7 @@ private void process(final Connection conn, Message message, final MessageVisito
}
@Override public void defaultAction(Message message) {
- getLogger().severe("first message is not a logon");
+ getLogger().severe("first message is not a logon: " + message.toString());
logout(conn);
}
});
@@ -82,13 +82,14 @@ public void invalid() throws Exception {
/* Ref ID 1B: e. Receive any message other than a Logon message. */
public void otherMessageThanLogon() throws Exception {
+ Message message =
+ new MessageBuilder(MsgTypeValue.HEARTBEAT)
+ .msgSeqNum(1)
+ .build();
server.expect(MsgTypeValue.LOGON);
- server.respond(
- new MessageBuilder(MsgTypeValue.HEARTBEAT)
- .msgSeqNum(1)
- .build());
+ server.respond(message);
server.expect(MsgTypeValue.LOGOUT);
- checking(expectLogSevere("first message is not a logon"));
+ checking(expectLogSevere("first message is not a logon: " + message.toString()));
runInClient(new Runnable() {
@Override public void run() {
session.logon(connection);

0 comments on commit e89d69c

Please sign in to comment.