dcausse added a comment.

  In:
  
    val from: Future[Iterable[Statement]] = fetchAsync(item, fromRev)
    val to: Future[Iterable[Statement]] = fetchAsync(item, revision)
    
    val awaiting: Future[Unit] = from flatMap { fromIt =>
      to map {
        toIt => generateAndSendDiff(op, item, fromIt, toIt, revision, fromRev, 
origMeta, collector)
      }
    }
    
    Await.result(awaiting, Duration.Inf)
  
  Await.result will return as soon as the first failure occurs, this is not 
what the test expects.
  The test expects all future to be completed.
  The reason we want all futures to be completed is that we'd like to keep the 
number of free threads in the ExecutorService to be 2 so that the next message 
never waits previous fetches.

TASK DETAIL
  https://phabricator.wikimedia.org/T257795

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: dcausse
Cc: dcausse, Aklapper, CBogen, Akuckartz, darthmon_wmde, Nandana, Namenlos314, 
Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to