Skip to content

Timeouts are not ignored when debugging tests inside Pub Workspaces #5620

@FMorschel

Description

@FMorschel

Describe the bug
When running SDK tests, I constantly see test timeout exceptions when debugging them.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any test_reflective_loader test like pkg/analysis_server/test/src/services/correction/fix/remove_async_test.dart
  2. Add:
@Timeout(Duration(seconds: 5))
library;
import 'package:test/test.dart';

//...

@reflectiveTest
class RemoveAsyncIllegalReturnTest extends FixProcessorTest {
  @override
  FixKind get kind => DartFixKind.REMOVE_ASYNC;

  @soloTest
  void test_a() {
    print(''); // B1
    print(''); // B2
  }

  @soloTest
  Future<void> test_b() async {
    print(''); // B3
    await Future.delayed(Duration.zero);
    print(''); // B4
  }
//...
  1. Run the test and wait more than five seconds between B1 and B2, see no problems
  2. Run the test and wait more than five seconds between B3 and B4, see timeout

Expected behavior
Test timeout should be disabled when the debugger is running.

Please complete the following information:

Workspace Environment
Dart Code extension: 3.115.20250728
Flutter extension: 3.115.20250701 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.102.3

Workspace type: Dart (LSP) (Multiroot)
Workspace name: sdk (Workspace)

Dart (3.10.0-edge.2bd721707305288f80bcaeec1834cdfcb71885b7): C:\Users\felip_0vh5fa6\dart
Flutter (3.32.7): C:\Users\felip_0vh5fa6\.puro\envs\stable\flutter (No device)

Output from 'dart info'

C:\Users\felip_0vh5fa6\dart\bin\dart.exe info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.10.0-edge.2bd721707305288f80bcaeec1834cdfcb71885b7 (main) (Fri Jul 25 09:44:17 2025 -0700) on "windows_x64"
  • on windows / "Windows 11 Pro" 10.0 (Build 26100)
  • locale is pt-BR

Project info

  • sdk constraint: '^3.7.0'
  • dependencies: _fe_analyzer_shared, analysis_server_plugin, analyzer, analyzer_plugin, args, collection, convert, crypto, dart_style, dtd, http, json_rpc_2, language_server_protocol, linter, memory_usage, meta, path, pub_semver, stream_channel, telemetry, unified_analytics, vm_service, watcher, yaml, yaml_edit
  • dev_dependencies: analyzer_testing, analyzer_utilities, cli_util, lints, logging, matcher, test, test_descriptor, test_reflective_loader, web_socket_channel

Process info

Memory CPU Elapsed time Command line
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions