Skip to content

Supress timeout when debugging unit tests. #3687

@bsutton

Description

@bsutton

I think this will be problematic to solve and not entirely with-in dart-codes control but thought I would start the conversation somewhere.

When debugging unit tests with the test package it has a default timeout of 30 seconds.

The problem is that when you are debugging through unit tests you inevitably exceed the 30 second limit.

The result is that to debug a unit test you need to add the @timeout to every unit test which is annoying.

This has a second consequence in that I invariably forget to remove it so the timeout really no longer serves its intended purpose.

So the questions is whether there is someway of supressing the test package's timeout when debugging?

I guess this might be something that needs to be co-ordinated between the test package and vs-code.
Is it even possible for code to detect that it is being debugged?

Edit: I had a google and there is a kDebugMode available in flutter but I would like this to work for dart not just flutter apps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions