Skip to content

Commit

Permalink
Merge pull request #148 from flowbased/data_packets_only
Browse files Browse the repository at this point in the history
Only listen for data packets, not brackets
  • Loading branch information
bergie authored Mar 30, 2018
2 parents 7fdc794 + e94fed5 commit cd1b6de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/runner.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ sendMessageAndWait = (client, currentGraph, inputData, expectData, callback) ->
return received

checkSuccess = (s) ->
debug 'runtest got output on', s.payload.port
# We're only interested in response packets
return false unless s.protocol is 'runtime' and s.command is 'packet'
# Check that is for the current graph under test
return false unless s.payload.graph is currentGraph
# We're only interested in data IPs, not brackets
return false unless s.payload.event is 'data'
received = signalsToReceived observer.signals
result = (Object.keys(received).length == Object.keys(expectData).length)
return result
Expand All @@ -116,6 +121,8 @@ sendMessageAndWait = (client, currentGraph, inputData, expectData, callback) ->
# Output packet, see if it is an unexpected error
# Check that is for the current graph under test
return false unless s.payload.graph is currentGraph
# We're only interested in data IPs, not brackets
return false unless s.payload.event is 'data'
# We only care for packets to error port
return false unless s.payload.port is 'error'
# We only care if spec isn't expecting errors
Expand Down

0 comments on commit cd1b6de

Please sign in to comment.