Skip to content

Commit 216c3e3

Browse files
committed
Do not change acceptance test definition
Signed-off-by: Alexandre Thibault <[email protected]>
1 parent 9ce948f commit 216c3e3

File tree

8 files changed

+18
-26
lines changed

8 files changed

+18
-26
lines changed

_test/Reflector.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ def processLine(lineNum, line, body, cid)
6868
if body == "CONNECT"
6969
waitConnectAction(cid)
7070
elsif body == "DISCONNECT"
71-
waitDisconnectAction(cid, false)
72-
elsif body == "DISCONNECT_OR_ALREADY_DISCONNECTED"
73-
waitDisconnectAction(cid, true)
71+
waitDisconnectAction(cid)
7472
else
7573
raise "Syntax error: " + body
7674
end

_test/ReflectorClient.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def @reflector.disconnectAction(cid)
6666
def @reflector.waitConnectAction(cid)
6767
end
6868

69-
def @reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer)
69+
def @reflector.waitDisconnectAction(cid)
7070
begin
7171
socket = @sockets[cid]
7272
if IO.select([socket], nil, nil, 10) == nil then
@@ -75,7 +75,7 @@ def @reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer)
7575
raise "Expected disconnection, got data"
7676
end
7777
rescue Errno::ECONNRESET
78-
raise unless canBeDisconnectedByPeer
78+
# Ignore, server has already disconnected the socket
7979
end
8080
end
8181

_test/ReflectorServer.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,20 @@ def @reflector.waitConnectAction(cid)
5757
@server.waitConnectAction
5858
end
5959

60-
def @reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer)
60+
def @reflector.waitDisconnectAction(cid)
6161
begin
6262
if IO.select([@socket], nil, nil, 10) == nil then
6363
raise "Connection hangs after five seconds."
6464
elsif !@socket.eof? then
6565
raise "Expected disconnection, got data"
6666
end
67-
rescue Errno::ECONNRESET => e
68-
unless canBeDisconnectedByPeer
69-
raise
70-
end
67+
rescue Errno::ECONNRESET
68+
# Ignore, client has already disconnected the socket
7169
end
7270
end
7371

7472
end
73+
7574
def connectAction(s)
7675
if @socket == nil
7776
@socket = s

_test/ReflectorTestCase.rb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,9 @@ def reflector.waitConnectAction(cid)
181181
@econ += cid.to_s + "," + "eCONNECT" + "|"
182182
end
183183

184-
def reflector.waitDisconnectAction(cid, canBeDisconnectedByPeer)
185-
if canBeDisconnectedByPeer then
186-
@cum += cid.to_s + "," + "eDISCONNECT_OR_ALREADY_DISCONNECTED" + "|"
187-
@edis += cid.to_s + "," + "eDISCONNECT_OR_ALREADY_DISCONNECTED" + "|"
188-
else
189-
@cum += cid.to_s + "," + "eDISCONNECT" + "|"
190-
@edis += cid.to_s + "," + "eDISCONNECT" + "|"
191-
end
184+
def reflector.waitDisconnectAction(cid)
185+
@cum += cid.to_s + "," + "eDISCONNECT" + "|"
186+
@edis += cid.to_s + "," + "eDISCONNECT" + "|"
192187
end
193188

194189
def reflector.errorAction(lineNum, msg)

_test/definitions/server/fix50sp2/2f_PossDupOrigSendingTimeTooHigh.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ E8=FIXT.1.19=9935=334=449=ISLD52=00000000-00:00:00.00056=TW45=258=Sendin
1919
# logout message
2020
E8=FIXT.1.19=4935=534=549=ISLD52=00000000-00:00:00.00056=TW10=0
2121
I8=FIXT.1.135=534=449=TW52=<TIME>56=ISLD
22-
eDISCONNECT_OR_ALREADY_DISCONNECTED
22+
eDISCONNECT

_test/definitions/server/fix50sp2/2i_BeginStringValueUnexpected.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ E8=FIXT.1.19=6835=A34=149=ISLD52=00000000-00:00:00.00056=TW98=0108=3011
88
I8=FIX.4.135=134=249=TW52=<TIME>56=ISLD112=id
99
E8=FIXT.1.19=7435=534=249=ISLD52=00000000-00:00:00.00056=TW58=Incorrect BeginString10=0
1010
I8=FIXT.1.135=534=349=TW52=<TIME>56=ISLD
11-
eDISCONNECT_OR_ALREADY_DISCONNECTED
11+
eDISCONNECT
1212

1313
iCONNECT
1414
I8=FIXT.1.135=A34=149=TW52=<TIME>56=ISLD98=0108=301137=9
@@ -17,4 +17,4 @@ E8=FIXT.1.19=6835=A34=149=ISLD52=00000000-00:00:00.00056=TW98=0108=3011
1717
# Send with incorrect begin string and don't respond to logout
1818
I8=FIX.4.135=134=249=TW52=<TIME>56=ISLD112=id
1919
E8=FIXT.1.19=7435=534=249=ISLD52=00000000-00:00:00.00056=TW58=Incorrect BeginString10=0
20-
eDISCONNECT_OR_ALREADY_DISCONNECTED
20+
eDISCONNECT

_test/definitions/server/fix50sp2/2k_CompIDDoesNotMatchProfile.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ E8=FIXT.1.19=8435=334=249=ISLD52=00000000-00:00:00.00056=TW45=258=CompID
1212
# logout message
1313
E8=FIXT.1.19=4935=534=349=ISLD52=00000000-00:00:00.00056=TW10=0
1414
I8=FIXT.1.135=534=349=TW52=<TIME>56=ISLD
15-
eDISCONNECT_OR_ALREADY_DISCONNECTED
15+
eDISCONNECT
1616

1717
# TargetCompID is invalid
1818

@@ -28,7 +28,7 @@ E8=FIXT.1.19=8435=334=249=ISLD52=00000000-00:00:00.00056=TW45=258=CompID
2828
# logout message
2929
E8=FIXT.1.19=4935=534=349=ISLD52=00000000-00:00:00.00056=TW10=0
3030
I8=FIXT.1.135=534=349=TW52=<TIME>56=ISLD
31-
eDISCONNECT_OR_ALREADY_DISCONNECTED
31+
eDISCONNECT
3232

3333
# SenderCompID and TargetCompID is invalid
3434

@@ -44,4 +44,4 @@ E8=FIXT.1.19=8435=334=249=ISLD52=00000000-00:00:00.00056=TW45=258=CompID
4444
# logout message
4545
E8=FIXT.1.19=4935=534=349=ISLD52=00000000-00:00:00.00056=TW10=0
4646
I8=FIXT.1.135=534=349=TW52=<TIME>56=ISLD
47-
eDISCONNECT_OR_ALREADY_DISCONNECTED
47+
eDISCONNECT

_test/definitions/server/fix50sp2/2o_SendingTimeValueOutOfRange.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ I8=FIXT.1.135=034=249=TW52=<TIME-121>56=ISLD
1111
E8=FIXT.1.19=9935=334=249=ISLD52=00000000-00:00:00.00056=TW45=258=SendingTime accuracy problem372=0373=1010=0
1212
E8=FIXT.1.19=4935=534=349=ISLD52=00000000-00:00:00.00056=TW10=0
1313
I8=FIXT.1.135=534=349=TW52=<TIME>56=ISLD
14-
eDISCONNECT_OR_ALREADY_DISCONNECTED
14+
eDISCONNECT
1515

1616
# SendingTime is too large, reject
1717

@@ -26,4 +26,4 @@ I8=FIXT.1.135=034=249=TW52=<TIME+121>56=ISLD
2626
E8=FIXT.1.19=9935=334=249=ISLD52=00000000-00:00:00.00056=TW45=258=SendingTime accuracy problem372=0373=1010=0
2727
E8=FIXT.1.19=4935=534=349=ISLD52=00000000-00:00:00.00056=TW10=0
2828
I8=FIXT.1.135=534=349=TW52=<TIME>56=ISLD
29-
eDISCONNECT_OR_ALREADY_DISCONNECTED
29+
eDISCONNECT

0 commit comments

Comments
 (0)