Skip to content

Commit 034678a

Browse files
committed
autocomplete test [nfc]: Break the loop when event-queue wait is not necessary
In this specific case, this change is not crucial for the test performance as the loop iterations are way less to cause an issue, but it is a good habit to add it as one would copy this part of the code in the future and repurpose it with large loop iterations; in which it would be a test performance issue.
1 parent 51e01f4 commit 034678a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/model/autocomplete_test.dart

+1
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ void main() {
296296
check(done).isFalse();
297297
for (int i = 0; i < 3; i++) {
298298
await Future(() {});
299+
if (done) break;
299300
}
300301
check(done).isTrue();
301302
final results = view.results

0 commit comments

Comments
 (0)