Skip to content

Commit

Permalink
#2361. Improve some flaky tests on Web (#2364)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov authored Nov 10, 2023
1 parent c4ca3b7 commit 306f82e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
10 changes: 6 additions & 4 deletions LibTest/async/Future/Future.delayed_A01_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Duration safetyMargin = const bool.fromEnvironment('dart.library.js')
? Duration(milliseconds: 40)
: Duration.zero;

check(delayms, value) {
check(delayms) {
Duration delay = durationInMilliseconds(delayms);
Stopwatch sw = new Stopwatch();
asyncStart();
Expand All @@ -36,7 +36,9 @@ check(delayms, value) {
}

main() {
check(0, 11);
check(300, 3);
check(50, 22);
check(0);
check(30);
check(50);
check(100);
check(150);
}
2 changes: 2 additions & 0 deletions LibTest/async/Stream/Stream.periodic_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@ main() {
check(1);
check(10);
check(30);
check(50);
check(100);
check(200);
}
4 changes: 4 additions & 0 deletions LibTest/async/Timer/Timer_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ check(int delayms) {
}

main() {
check(150);
check(100);
check(50);
check(25);
check(10);
check(2);
check(1);
check(0);
check(-5);
check(-50);
}
1 change: 1 addition & 0 deletions LibTest/html/Element/onMouseOver_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ main() {
Expect.equals(type, e.type);
if (!fired) {
asyncEnd();
fired = true;
}
});
var event = new MouseEvent(type);
Expand Down

0 comments on commit 306f82e

Please sign in to comment.