Skip to content

Test run "hangs" at startup with invalid code #4358

@DanTup

Description

@DanTup
import 'package:test/test.dart';

main() {
  test('slow', () async {
    print('starting...');
    await Future<void>.delayed(const Duration(seconds: 5));
  }, timeout: const Timeout.factor(10));
}

When I try to run this code, it fails with this error:

Screenshot 2023-01-24 at 10 59 36

However, if I try to Debug it (both runs use the CodeLens on the main function), it just hangs with no error:

Screenshot 2023-01-24 at 11 00 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin testingRelates to test execution of Dart/Flutter tests for end usersis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions