Fix race condition in InputStreamSinkSpec (#28990)
There's only one read so it was relying on both the Data and the Failed being in the shared queue when it takes place. Remove the data so that the poll on the shared queue will wait for the Failed to be added. Ref #28829
This commit is contained in:
parent
683868f9fe
commit
0a208f4cb8
1 changed files with 1 additions and 3 deletions
|
|
@ -263,10 +263,8 @@ class InputStreamSinkSpec extends StreamSpec(UnboundedMailboxConfig) {
|
|||
|
||||
"propagate error to InputStream" in {
|
||||
val readTimeout = 3.seconds
|
||||
val (probe, inputStream) =
|
||||
val (probe, inputStream: InputStream) =
|
||||
TestSource.probe[ByteString].toMat(StreamConverters.asInputStream(readTimeout))(Keep.both).run()
|
||||
|
||||
probe.sendNext(ByteString("one"))
|
||||
val error = new RuntimeException("failure")
|
||||
probe.sendError(error)
|
||||
val buffer = Array.ofDim[Byte](5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue