Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.

Commit 93fbbfd

Browse files
committed
Fixing failing test
Signed-off-by: Winarto Zhao <[email protected]>
1 parent abad581 commit 93fbbfd

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/main/scala/reactor/core/scala/publisher/SMono.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,20 @@ object SMono extends ScalaConverters {
15361536
JMono.zipDelayError[T1, T2, T3, T4, T5, T6](p1.coreMono, p2.coreMono, p3.coreMono, p4.coreMono, p5.coreMono, p6.coreMono).map((t: Tuple6[T1, T2, T3, T4, T5, T6]) => tupleSix2ScalaTuple6(t))
15371537
)
15381538

1539+
/**
1540+
* Aggregate given publishers into a new [[SMono]] that will be
1541+
* fulfilled when all of the given <code>sources</code> have completed. If any Publisher
1542+
* terminates without value, the returned sequence will be terminated immediately and
1543+
* pending results cancelled. Errors from the sources are delayed.
1544+
* If several Publishers error, the exceptions are combined (as suppressed exceptions on a root exception).
1545+
*
1546+
* <p>
1547+
* <img class="marble" src="https://raw.githubusercontent.com/reactor/reactor-core/master/reactor-core/src/main/java/reactor/core/publisher/doc-files/marbles/whenDelayError.svg" alt="">
1548+
* <p>
1549+
*
1550+
* @param sources The sources to use.
1551+
* @return a [[SMono]].
1552+
*/
15391553
def whenDelayError(sources: Iterable[_ <: Publisher[_] with MapablePublisher[_]]): SMono[Unit] = new ReactiveSMono[Unit](
15401554
JMono.whenDelayError(sources.map(s => s.map((_: Any) => None.orNull: Void)).asJava).map((_: Void) => ())
15411555
)

src/test/scala/reactor/core/scala/publisher/SMonoTest.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,14 @@ class SMonoTest extends AnyFreeSpec with Matchers with TestSupport with Idiomati
276276
"with iterable" - {
277277
"of publisher of unit should return when all of the sources has fulfilled" in {
278278
val completed = new ConcurrentHashMap[String, Boolean]()
279-
val mono = SMono.whenDelayError(Iterable(
279+
val mono: SMono[Unit] = SMono.whenDelayError(Iterable(
280280
just({
281281
completed.put("first", true)
282+
1
282283
}),
283284
just({
284285
completed.put("second", true)
286+
2
285287
})
286288
))
287289
StepVerifier.create(mono)

0 commit comments

Comments
 (0)