Skip to content
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

Only listen for data packets, not brackets #148

Merged
merged 1 commit into from
Mar 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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