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

Unified Diff: pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart

Issue 2710193002: Update the analysis server integration tests to always run on the analysis driver. (Closed)
Patch Set: Created 3 years, 10 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
Index: pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
diff --git a/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart b/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
index d2a996ddb7c4a91138e6b94b2662ab4d1b00b789..12db1c895a91c7e1ddada7af9094848858b077f1 100644
--- a/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
+++ b/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
@@ -10,30 +10,21 @@ import '../integration_tests.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetSubscriptionsTest);
- defineReflectiveTests(SetSubscriptionsTest_Driver);
});
}
-class AbstractSetSubscriptionsTest
- extends AbstractAnalysisServerIntegrationTest {
- test_setSubscriptions_invalidService() {
+@reflectiveTest
+class SetSubscriptionsTest extends AbstractAnalysisServerIntegrationTest {
+ test_setSubscriptions_invalidService() async {
// TODO(paulberry): verify that if an invalid service is specified, the
// current subscriptions are unchanged.
- return server.send("server.setSubscriptions", {
- 'subscriptions': ['bogus']
- }).then((_) {
+ try {
+ await server.send("server.setSubscriptions", {
+ 'subscriptions': ['bogus']
+ });
fail('setSubscriptions should have produced an error');
- }, onError: (error) {
- // The expected error occurred.
- });
+ } on ServerErrorMessage catch (message) {
+ expect(message.error['code'], 'INVALID_PARAMETER');
+ }
}
}
-
-@reflectiveTest
-class SetSubscriptionsTest extends AbstractSetSubscriptionsTest {}
-
-@reflectiveTest
-class SetSubscriptionsTest_Driver extends AbstractSetSubscriptionsTest {
- @override
- bool get enableNewAnalysisDriver => true;
-}

Powered by Google App Engine
This is Rietveld 408576698