Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Prev Previous commit
Next Next commit
add wait to doesNotComplete
  • Loading branch information
bparrishMines committed Sep 24, 2020
commit 1989ef53b0c792df4d5301988e7f43420145bba3
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ void main() {
);

expect(errorCompleter.future, doesNotComplete);
await Future.delayed(Duration(seconds: 5));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this when looking at the PR before; why is there a 5-second sleep at the end of these tests? At the very least this needs a clear comment, but is there really not some reliable thing we can wait for to do whatever this is intended to do, rather than relying on timing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I believed there was a chance for an error to occur after the page finished loading, but I just tested it and that doesn't look like the case for the url provided. I changed it to wait for onPageFinished.

});

testWidgets(
Expand Down