Skip to content

Test Discovery on expanding nodes for closed files sometimes doesn't discover tests #4594

@DanTup

Description

@DanTup

... but opening the file does:

test.discovery.mp4

When we open the file, seems like we don't get an outline (but the discovery code expects that we do):

Mon Jun 19 2023 [16:27:15 GMT+0100 (British Summer Time)] Log file started
[4:27:17 PM] [General] [Info] Returning cached results for project search
[4:27:20 PM] [Analyzer] [Info] ==> Content-Length: 426
[4:27:20 PM] [Analyzer] [Info] ==> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C%3A/Dev/Test%20Projects/dartcode_4553_project2/test/test2_test.dart","languageId":"dart","version":1,"text":"import 'package:test/test.dart';\n\nvoid main() {\n  test('project2 passing test 2', () {\n    expect(1, 1);\n  });\n\n  test('project2 failing test 2', () {\n    expect(1, 2);\n  });\n}\n"}},"clientRequestTime":1687188440001}
[4:27:20 PM] [Analyzer] [Info] ==> Content-Length: 426
[4:27:20 PM] [Analyzer] [Info] ==> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C%3A/Dev/Test%20Projects/dartcode_4553_project1/test/test2_test.dart","languageId":"dart","version":1,"text":"import 'package:test/test.dart';\n\nvoid main() {\n  test('project1 passing test 2', () {\n    expect(1, 1);\n  });\n\n  test('project1 failing test 2', () {\n    expect(1, 2);\n  });\n}\n"}},"clientRequestTime":1687188440585}
[4:27:21 PM] [Analyzer] [Info] ==> Content-Length: 426
[4:27:21 PM] [Analyzer] [Info] ==> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C%3A/Dev/Test%20Projects/dartcode_4553_project2/test/test1_test.dart","languageId":"dart","version":1,"text":"import 'package:test/test.dart';\n\nvoid main() {\n  test('project2 passing test 1', () {\n    expect(1, 1);\n  });\n\n  test('project2 failing test 1', () {\n    expect(1, 2);\n  });\n}\n"}},"clientRequestTime":1687188441071}
[4:27:21 PM] [Analyzer] [Info] ==> Content-Length: 426
[4:27:21 PM] [Analyzer] [Info] ==> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C%3A/Dev/Test%20Projects/dartcode_4553_project1/test/test1_test.dart","languageId":"dart","version":1,"text":"import 'package:test/test.dart';\n\nvoid main() {\n  test('project1 passing test 1', () {\n    expect(1, 1);\n  });\n\n  test('project1 failing test 1', () {\n    expect(1, 2);\n  });\n}\n"}},"clientRequestTime":1687188441583}
Mon Jun 19 2023 [16:27:41 GMT+0100 (British Summer Time)] Log file ended

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