               id: 'Drop1'
               graph: 'foo'
           ]
-          listener = (message) ->
-            data = JSON.parse message.utf8Data
-            validateSchema data, "/graph/output/#{data.command}"
-            return unless data.command is expects[0].command
-            expected = expects.shift()
-            chai.expect(data.payload).to.eql expected.payload
-            return if expects.length
-            # Received all packets
-            connection.removeListener 'message', listener
-            done()
-            return
-          connection.on 'message', listener
-
+          # Runtimes can send 'changeedge' and 'changenode' as part
+          # of the response for better fbp-graph/Journal behavior
+          receive expects, done, true
           send 'graph', 'removenode',
             id: 'Drop1'
             graph: 'foo'

                metadata: {}
                graph: 'foo'
            ]
            connection.once 'message', (message) ->
              data = JSON.parse message.utf8Data
              validateSchema data, '/graph/output/changenode'
              chai.expect(data.payload.metadata).to.eql expects[0].payload.metadata

              done()

            send 'graph', 'changenode',
              id: 'Drop1'
              metadata:

              port: 'out'
              public: 'out'
          ]
          receive expects, done
          send 'graph', 'addoutport',
            public: 'out'
            node: 'RepeatRenamed'
