Fix LazySourceSpec instability
Don't make claims about whether this stage has completed. Fixes #30492
This commit is contained in:
parent
999b0853d5
commit
4cf66549be
1 changed files with 2 additions and 4 deletions
|
|
@ -124,7 +124,7 @@ class LazySourceSpec extends StreamSpec with DefaultTimeout with ScalaFutures {
|
||||||
|
|
||||||
"never construct the source when there was no demand" in assertAllStagesStopped {
|
"never construct the source when there was no demand" in assertAllStagesStopped {
|
||||||
val constructed = new AtomicBoolean(false)
|
val constructed = new AtomicBoolean(false)
|
||||||
val result = Source
|
Source
|
||||||
.lazySource { () =>
|
.lazySource { () =>
|
||||||
constructed.set(true); Source(List(1, 2, 3))
|
constructed.set(true); Source(List(1, 2, 3))
|
||||||
}
|
}
|
||||||
|
|
@ -132,7 +132,6 @@ class LazySourceSpec extends StreamSpec with DefaultTimeout with ScalaFutures {
|
||||||
.run()
|
.run()
|
||||||
|
|
||||||
constructed.get() should ===(false)
|
constructed.get() should ===(false)
|
||||||
result.isCompleted should ===(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"fail the materialized value when downstream cancels without ever consuming any element" in assertAllStagesStopped {
|
"fail the materialized value when downstream cancels without ever consuming any element" in assertAllStagesStopped {
|
||||||
|
|
@ -271,7 +270,7 @@ class LazySourceSpec extends StreamSpec with DefaultTimeout with ScalaFutures {
|
||||||
|
|
||||||
"never construct the source when there was no demand" in assertAllStagesStopped {
|
"never construct the source when there was no demand" in assertAllStagesStopped {
|
||||||
val constructed = new AtomicBoolean(false)
|
val constructed = new AtomicBoolean(false)
|
||||||
val result = Source
|
Source
|
||||||
.lazyFutureSource { () =>
|
.lazyFutureSource { () =>
|
||||||
Future {
|
Future {
|
||||||
constructed.set(true)
|
constructed.set(true)
|
||||||
|
|
@ -282,7 +281,6 @@ class LazySourceSpec extends StreamSpec with DefaultTimeout with ScalaFutures {
|
||||||
.run()
|
.run()
|
||||||
|
|
||||||
constructed.get() should ===(false)
|
constructed.get() should ===(false)
|
||||||
result.isCompleted should ===(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"fail the materialized value when downstream cancels without ever consuming any element" in assertAllStagesStopped {
|
"fail the materialized value when downstream cancels without ever consuming any element" in assertAllStagesStopped {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue