Closed willardf closed 2 years ago
Hmmm yeah, noted on the reordering... especially without changing too much of the testing code - thoughts might be to just use a list and lock it (perf issues shouldn't be an issue here I think) or if we did keep time values, possibly set a delay after popping it off the queue? I'm thinking more abstractly here as these tests are pretty thick - I might be far off
Might need some extra thought on the tests. The problem is that the SocketCapture was grabbing a packet before waiting. Then it would implicitly discard that packet via wait time. If a packet is not in the queue, it's really hard to reorder the queue, so I made us wait, then grab a packet. I also wanted to make discarding packets explicit instead of timed, but packet arrival is very time-sensitive, so it's hard to assert that things are truly happening the way they should.