teetime-framework / TeeTime

The Java reference implementation of the Pipe-and-Filter framework TeeTime
http://teetime-framework.github.io
Apache License 2.0
20 stars 5 forks source link

Testing stages with multiple inputs and state does not work #28

Open rju opened 1 year ago

rju commented 1 year ago

The TeeTime StageTester can be used to test stages with multiple input ports. However, when the stages have a state and the state depends on the sequence of events, then this fails, as inputs for different ports seem to be inputted in "parallel". Due to race conditions the sequence of events may change from one run to the next.

rju commented 1 year ago

A solution could be to execute inputs in the sequence they are specified in the test, e.g., send(values1).to(port1).send(values2).to(port2).send(additionalValues).to(port1).start();