Skip to content

Commit

Permalink
[flutter_tools] timeline_test.dart flaky (#116667)
Browse files Browse the repository at this point in the history
* contains name instead of remove last

* fix expect

* remove and expect on elements

* delete unused code
  • Loading branch information
Jasguerrero committed Jan 3, 2023
1 parent 64e7336 commit fe8dcf6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ void main() {
// The downloaded part of the timeline may contain an end event whose
// corresponding begin event happened before the start of the timeline.
if (stack.isNotEmpty) {
expect(stack.removeLast(), name);
bool pass = false;
while (stack.isNotEmpty) {
final String value = stack.removeLast();
if (value == name) {
pass = true;
break;
}
}
expect(pass, true);
}
}
}
Expand Down

0 comments on commit fe8dcf6

Please sign in to comment.