This test is constructed in such a way that when the buffer for a query stream overflows, the user should be able to consume the elements that did fit in the buffer. However, the underlying stream regards the overflow as an error, and will close the stream directly, clearing any buffers (note: the bug is likely that it shouldn't call close, but only close the producer side, as calling close is an action reserved for users only).
Alternatively, we could consider that this scenario is not supported at all, and have an overflow be fatal, in which case closing the stream and clearing any available data is the correct action.
This test is constructed in such a way that when the buffer for a query stream overflows, the user should be able to consume the elements that did fit in the buffer. However, the underlying stream regards the overflow as an error, and will close the stream directly, clearing any buffers (note: the bug is likely that it shouldn't call
close, but only close the producer side, as callingcloseis an action reserved for users only).Alternatively, we could consider that this scenario is not supported at all, and have an overflow be fatal, in which case closing the stream and clearing any available data is the correct action.