Skip to content

Commit fe8dcf6

Browse files
authored
[flutter_tools] timeline_test.dart flaky (#116667)
* contains name instead of remove last * fix expect * remove and expect on elements * delete unused code
1 parent 64e7336 commit fe8dcf6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/flutter_tools/test/integration.shard/timeline_test.dart

+9-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,15 @@ void main() {
9696
// The downloaded part of the timeline may contain an end event whose
9797
// corresponding begin event happened before the start of the timeline.
9898
if (stack.isNotEmpty) {
99-
expect(stack.removeLast(), name);
99+
bool pass = false;
100+
while (stack.isNotEmpty) {
101+
final String value = stack.removeLast();
102+
if (value == name) {
103+
pass = true;
104+
break;
105+
}
106+
}
107+
expect(pass, true);
100108
}
101109
}
102110
}

0 commit comments

Comments
 (0)