Tests don't finish "loading" until main returns - obfuscating the actual issue
- Dominant language
- Dart
- Stars
- 536
- Forks
- 232
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 10
Description
The "loading" message is displayed until the "main" function of the test returns, and if it returns a Future then it waits until that Future completes.
If for some reason the test returns a Future that never completes then it will hang on the "loading" phase indefinitely. Timeouts are not respected. This makes it appear like a bug in the test runner and not the test itself.
For instance the following test will wait the full 90 seconds on the "loading" phase:
```
main() async {
await Future.delayed(Duration(seconds: 90));
}
```
I think it makes sense that we consider this the "loading" phase, as we are still collecting groups/tests, but we should at least respect the timeouts during the phase.
Contributor guide
Research direction
Start by reproducing the issue with the provided async main and a timeout, then trace how the test runner waits for main to return during the loading phase. Done means a test whose Future never completes no longer masks the failure indefinitely and configured timeouts are respected during loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100