Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: pkg/analysis_server/test/services/index/store/split_store_test.dart

Issue 1168473003: Issue 23573. Catch exception during indexing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clean index information for the current Dart unit on exception. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/index/store/split_store.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/index/store/split_store_test.dart
diff --git a/pkg/analysis_server/test/services/index/store/split_store_test.dart b/pkg/analysis_server/test/services/index/store/split_store_test.dart
index 02fa3fe16f00cd82bd0035c8c2f9dd4816b12b51..b954996bfc6a4478c9d7fd7f4a50825b76a57aef 100644
--- a/pkg/analysis_server/test/services/index/store/split_store_test.dart
+++ b/pkg/analysis_server/test/services/index/store/split_store_test.dart
@@ -666,6 +666,22 @@ class _SplitIndexStoreTest {
expect(store.aboutToIndexHtml(contextA, htmlElementA), isFalse);
}
+ test_cancelIndexDart() {
+ LocationImpl locationA = mockLocation(indexableA);
+ LocationImpl locationB = mockLocation(indexableA);
+ store.aboutToIndexDart(contextA, unitElementA);
+ store.recordRelationship(indexableA, relationship, locationA);
+ store.recordRelationship(indexableA, relationship, locationB);
+ store.recordTopLevelDeclaration(elementA);
+ store.cancelIndexDart();
+ return store
+ .getRelationships(indexableA, relationship)
+ .then((List<LocationImpl> locations) {
+ assertLocations(locations, []);
+ expect(store.getTopLevelDeclarations((name) => true), isEmpty);
+ });
+ }
+
void test_clear() {
LocationImpl locationA = mockLocation(indexableA);
store.aboutToIndexDart(contextA, unitElementA);
« no previous file with comments | « pkg/analysis_server/lib/src/services/index/store/split_store.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698