spotify / completable-futures

Utilities for working with futures in Java 8
Apache License 2.0
393 stars 51 forks source link

Use deterministic scheduler in test (fixes #43). #45

Closed mbruggmann closed 8 years ago

mbruggmann commented 8 years ago

We used the ScheduledThreadPoolExecutor in the test before, which could fail the test for timing issues. Swap it for the deterministic scheduler instead, that'll give us predictable behavior and still verifies that the polling future is cancelled.

This should resolve #43