Ensure timers are started before awaits in tests (dart-lang/stream_transform#29)

Fixes dart-lang/stream_transform#25

These tests were relying on a 5ms Timer getting started asynchronously
and firing before a 10ms delay which is not guaranteed. By waiting an
extra cycle through the event loop to ensure that the Timer starts
before the delay we can have a better guarantee of ordering.

- Add a test util to wait for Timers to start and then elapse.
- Replace `await new Future.delayed(arbitraryDelay)` with the new utility.
- Add missing copyright notices on touched files.
4 files changed
tree: 6e0f8c73f4dfdada561ed6686a7f03644d5349eb
  1. pkgs/