diff --git a/_test/Reflector.rb b/_test/Reflector.rb index c28fd7c0b..fe9535f39 100644 --- a/_test/Reflector.rb +++ b/_test/Reflector.rb @@ -68,9 +68,7 @@ def processLine(lineNum, line, body, cid) if body == "CONNECT" waitConnectAction(cid) elsif body == "DISCONNECT" - waitDisconnectAction(cid, false) - elsif body == "DISCONNECT_OR_ALREADY_DISCONNECTED" - waitDisconnectAction(cid, true) + waitDisconnectAction(cid) else raise "Syntax error: " + body end diff --git a/_test/ReflectorClient.rb b/_test/ReflectorClient.rb index b3fefdbbb..acc8acc72 100644 --- a/_test/ReflectorClient.rb +++ b/_test/ReflectorClient.rb @@ -66,7 +66,7 @@ def @reflector.disconnectAction(cid) def @reflector.waitConnectAction(cid) end - def @reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer) + def @reflector.waitDisconnectAction(cid) begin socket = @sockets[cid] if IO.select([socket], nil, nil, 10) == nil then @@ -75,7 +75,7 @@ def @reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer) raise "Expected disconnection, got data" end rescue Errno::ECONNRESET - raise unless canBeDisconnectedByPeer + # Ignore, server has already disconnected the socket end end diff --git a/_test/ReflectorServer.rb b/_test/ReflectorServer.rb index 3f0f89478..43113157d 100644 --- a/_test/ReflectorServer.rb +++ b/_test/ReflectorServer.rb @@ -57,21 +57,20 @@ def @reflector.waitConnectAction(cid) @server.waitConnectAction end - def @reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer) + def @reflector.waitDisconnectAction(cid) begin if IO.select([@socket], nil, nil, 10) == nil then raise "Connection hangs after five seconds." elsif !@socket.eof? then raise "Expected disconnection, got data" end - rescue Errno::ECONNRESET => e - unless canBeDisconnectedByPeer - raise - end + rescue Errno::ECONNRESET + # Ignore, client has already disconnected the socket end end end + def connectAction(s) if @socket == nil @socket = s diff --git a/_test/ReflectorTestCase.rb b/_test/ReflectorTestCase.rb index 64f950174..b36e41170 100644 --- a/_test/ReflectorTestCase.rb +++ b/_test/ReflectorTestCase.rb @@ -181,14 +181,9 @@ def reflector.waitConnectAction(cid) @econ += cid.to_s + "," + "eCONNECT" + "|" end - def reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer) - if canBeDisconnectedByPeer then - @cum += cid.to_s + "," + "eDISCONNECT_OR_ALREADY_DISCONNECTED" + "|" - @edis += cid.to_s + "," + "eDISCONNECT_OR_ALREADY_DISCONNECTED" + "|" - else - @cum += cid.to_s + "," + "eDISCONNECT" + "|" - @edis += cid.to_s + "," + "eDISCONNECT" + "|" - end + def reflector.waitDisconnectAction(cid) + @cum += cid.to_s + "," + "eDISCONNECT" + "|" + @edis += cid.to_s + "," + "eDISCONNECT" + "|" end def reflector.errorAction(lineNum, msg) diff --git a/_test/definitions/server/fix50sp2/2f_PossDupOrigSendingTimeTooHigh.def b/_test/definitions/server/fix50sp2/2f_PossDupOrigSendingTimeTooHigh.def index 35bee0af1..b5a387091 100644 --- a/_test/definitions/server/fix50sp2/2f_PossDupOrigSendingTimeTooHigh.def +++ b/_test/definitions/server/fix50sp2/2f_PossDupOrigSendingTimeTooHigh.def @@ -19,4 +19,4 @@ E8=FIXT.1.19=9935=334=449=ISLD52=00000000-00:00:00.00056=TW45=258=Sendin # logout message E8=FIXT.1.19=4935=534=549=ISLD52=00000000-00:00:00.00056=TW10=0 I8=FIXT.1.135=534=449=TW52=