dart-lang / dart-lang/test

FR: Consider running --chain-async-frames on failure only

Open
#585 5 comments 1 reaction 0 assignees View on GitHub
type-enhancement
Dominant language
Dart
Stars
536
Forks
232
Avg merge
1d 10h
Merged PRs (30d)
10

Description

This might be the best of both worlds. 99% of tests don't fail (i.e. are running on CI).

Example workflow:

1. `pub run test`: All tests passed

No chaining on frames necessary, since there are no failures. Green.

2. `pub run test --chain-async-frames`: All tests passed or tests failed

Always chain frames. Not by default

3. `pub run test`: 1 or more tests failed

The package (`pkg/test`) catches tests with at least 1 uncaught exception/failure, mutes the failure, and then runs *again* with chaining to get a better stack trace.

We could conditionally enable this like --chain-async-frames-on-failure to try it out.

Contributor guide

Open the contributing guide

Research direction

Start in the `pkg/test` package and compare the behavior of `pub run test` with `pub run test --chain-async-frames`. Determine whether the proposed retry-on-failure workflow fits the package's test execution flow, and verify that failures receive chained stack traces without changing the default behavior for passing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.