linkedin/parseq — pull request #1 by cpettitt (2012-09-19 15:35:42+00:00)
Title: Fix par task test race condition

In TestTasks we have test to ensure that tasks composed with `par` are
run in parallel. The test makes the assumption that setting a value for
the promise returned from a task will immediately set the value for the
task itself. However, there is a gap between returning a promise and
hooking up the promise listener which allows for a race.

This change eliminates the race by waiting for the par task to complete.
Alternatively, we could have waited for task 2 to complete, but this
approach is more general and less sensitive to changes.