A small service collects a short summary from several asynchronous computations and returns it as Future[String].
Future[String], all computations must be awaited until completion.Future must also fail.|.Future with the string empty.ExecutionContext and must not block a thread while waiting for the result.SummaryService.summarize for two tasks where one succeeds and the other fails.Future.Example input data:
val ok = Future.successful("A")
val fail = Future.failed[String](new RuntimeException("boom"))
List(ok, fail), the resulting Future must fail with boom.List(ok, Future.successful("B")), the final string must be A | B.Nil, the result must be empty.scala-cli test . with the provided ExecutionContext.globalUse line comments to explain the problem, its impact, the fix and how to test it.