Skip to content

Commit e18fd7c

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Remove the test for getNavigation() and removing the analysis context.
The test times out, because we don't get any answer on our getNavigation(). Technically this happens because we dispose the corresponding instance of AnalysisDriver, so it is removed from the AnalysisDriverScheduler, and getResult() never completes. Which, I think makes sense. Once the analysis root is removed, the client cannot expect answers. So, there is no need for the test. [email protected] Change-Id: I124ac3d6a4a903880c7b8f82cafe692b38c59017 Reviewed-on: https://dart-review.googlesource.com/57903 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 2a545d7 commit e18fd7c

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

pkg/analysis_server/test/analysis/get_navigation_test.dart

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:analysis_server/protocol/protocol.dart';
66
import 'package:analysis_server/protocol/protocol_generated.dart';
77
import 'package:analysis_server/src/domain_analysis.dart';
8-
import 'package:analyzer/file_system/file_system.dart';
98
import 'package:analyzer_plugin/protocol/protocol_common.dart';
109
import 'package:test/test.dart';
1110
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -185,28 +184,6 @@ main() {
185184
}
186185
}
187186

188-
test_removeContextAfterRequest() async {
189-
addTestFile('''
190-
main() {
191-
var test = 0;
192-
print(test);
193-
}
194-
''');
195-
// handle the request synchronously
196-
Request request =
197-
_createGetNavigationRequest(testFile, testCode.indexOf('test);'), 0);
198-
server.handleRequest(request);
199-
// remove context, causes sending an "invalid file" error
200-
{
201-
Folder projectFolder = getFolder(projectPath);
202-
server.contextManager.callbacks.removeContext(projectFolder, <String>[]);
203-
}
204-
// wait for an error response
205-
Response response = await serverChannel.waitForResponse(request);
206-
expect(response.error, isNotNull);
207-
expect(response.error.code, RequestErrorCode.GET_NAVIGATION_INVALID_FILE);
208-
}
209-
210187
test_zeroLength_end() async {
211188
addTestFile('''
212189
main() {

0 commit comments

Comments
 (0)