Closed gangstead closed 9 years ago
The problem is that defining the through stream outside of the server means all the requests share the same queue. This is fine when I test it once at a time, but the tester makes a bunch of tests in parallel.
correct.
I'm working through stream-adventure and I'm trying to use
through
in a slightly different way than the official solution.The jist of the supplied solution is this code in the server definition:
The only difference I'm trying to do is:
It there any reason why I can't do an assignment like this?
My code will work when I make my posts individually, but when stream-adventure verifies it with a collection of tests I get a handful of actual results duplicated, and the rest of the expected results don't line up :
I've seen 1-5 results duplicated, sometimes it it's the expected results that are duplicated, not the actual results. Initially I wanted to blame the test runner, but it works fine when the
through
stream is defined inline so I suspect I'm not understanding something fundamental about thethrough
module.I've also used this code from an earlier module in stream-adventure that uses
through
and had the same problem: