New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flaky co19/LibTest/async/Future/Future.delayed_A01_t02 #15524
Comments
Vm failure (in flaky log): Dartium failure: |
Set owner to @lrhn. |
I hope to have fixed the VM timer. |
Moving to Dartium, as dart:io should be fixed by now. Re-added test for VM in r31658. Removed Area-IO label. |
We need a Dartium developer to check if this is still a problem. |
The test co19/LibTest/async/Future/Future.delayed_A01_t02 looks like this (co19 rev 672):
20 check(delayms, value) {
21 Duration delay=durationMs(delayms);
22 Stopwatch sw=new Stopwatch();
23 sw.start();
24 asyncStart();
25 Future future = new Future.delayed(delay, (){
26 Duration elapsed=sw.elapsed;
27 Expect.isTrue(elapsed >= delay, "delay=$delay, elapsed=${elapsed}");
28 asyncEnd();
29 });
30 }
31
32 main() {
33 check(0, 11);
34 check(300, 3);
35 check(50, 22);
36 }
(Note: the second argument to check is ignored)
It seems like this is a legitimate test, it calls Future.delayed() with a "delay" and asserts that the callback is only called after "delay" using a StopWatch.
This test is highly flaky on both the standalone VM and dartium (it surprised me that it's flaky on both, I would expect that standalone VM and dartium have different timer implementations).
Could someone from dartium and someone from dart:io investigate?
[Setting Area-IO, but this is dartium as well]
@floitsch: Maybe you can give some insight into the implementation of Future.delayed?
The text was updated successfully, but these errors were encountered: