You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing I added @soloTest to the newly added test AbstractLspAnalysisServerTest.test_partFile_issue59572. And gave a try to add argument: ['./lib/part.dart'] to the Command constructor on it. That can reliably reproduce the failure for the 5-second timeout on my machine. The stack trace:
TimeoutException after 0:00:05.000000: Future not completed dart:async/future_impl.dart 1025:22 Future.timeout.<fn>future_impl.dart:1025 ===== asynchronous gap =========================== test\lsp\server_abstract.dart 1139:29 LspAnalysisServerTestMixin.expectRequestserver_abstract.dart:1139 ===== asynchronous gap =========================== test\lsp\server_abstract.dart 1181:27 LspAnalysisServerTestMixin.handleExpectedRequestserver_abstract.dart:1181 ===== asynchronous gap =========================== test\lsp\server_abstract.dart 155:27 AbstractLspAnalysisServerTest.executeForEditsserver_abstract.dart:155 ===== asynchronous gap =========================== test\lsp\server_abstract.dart 369:20 AbstractLspAnalysisServerTest.verifyCommandEditsserver_abstract.dart:369 ===== asynchronous gap =========================== test\lsp\commands\fix_all_in_workspace_test.dart 169:5 AbstractFixAllInWorkspaceTest.test_partFile_issue59572fix_all_in_workspace_test.dart:169 ===== asynchronous gap =========================== package:test_reflective_loader/test_reflective_loader.dart 261:5 _runTesttest_reflective_loader.dart:261 ===== asynchronous gap =========================== package:test_api/src/backend/declarer.dart 229:9 Declarer.test.<fn>.<fn>declarer.dart:229 ===== asynchronous gap =========================== package:test_api/src/backend/declarer.dart 227:7 Declarer.test.<fn>declarer.dart:227 ===== asynchronous gap =========================== package:test_api/src/backend/invoker.dart 258:9 Invoker._waitForOutstandingCallbacks.<fn>invoker.dart:258
The place where it is failing pkg\analysis_server\test\lsp\server_abstract.dart, line 1139, inside LspAnalysisServerTestMixin.expectRequest. The expectRequest contains a timeout that defaults to that value but the method that calls it (LspAnalysisServerTestMixin.handleExpectedRequest) also has a timeout parameter that is not passing through (in this case not even in use).
After a talk with @DanTup on Discord about this, we think it may be safe to increase that value. We'll also take a look at the timings here and why adding these (@soloTest and parameters) slows down the execution. Creating this issue to track this work.
As a note, if we increase it a lot (tested with 5 min) the tests themselves fail at 30 seconds. The take from @DanTup was that this was intended to give some indication as to where would it be taking a long time to answer.
The text was updated successfully, but these errors were encountered:
FMorschel
added
the
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
label
Dec 20, 2024
While working on https://dart-review.googlesource.com/c/sdk/+/401865 I added a test to
pkg\analysis_server\test\lsp\commands\fix_all_in_workspace_test.dart
as suggested by @DanTup at https://dart-review.googlesource.com/c/sdk/+/401840 for better debugging than thedart fix
tests since they should work the same way.While testing I added
@soloTest
to the newly added testAbstractLspAnalysisServerTest.test_partFile_issue59572
. And gave a try to addargument: ['./lib/part.dart']
to theCommand
constructor on it. That can reliably reproduce the failure for the 5-second timeout on my machine. The stack trace:The place where it is failing
pkg\analysis_server\test\lsp\server_abstract.dart
, line 1139, insideLspAnalysisServerTestMixin.expectRequest
. TheexpectRequest
contains atimeout
that defaults to that value but the method that calls it (LspAnalysisServerTestMixin.handleExpectedRequest
) also has atimeout
parameter that is not passing through (in this case not even in use).After a talk with @DanTup on Discord about this, we think it may be safe to increase that value. We'll also take a look at the timings here and why adding these (
@soloTest
andparameters
) slows down the execution. Creating this issue to track this work.As a note, if we increase it a lot (tested with 5 min) the tests themselves fail at 30 seconds. The take from @DanTup was that this was intended to give some indication as to where would it be taking a long time to answer.
The text was updated successfully, but these errors were encountered: