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

Side by Side Diff: pkg/analysis_server/test/integration/server/shutdown_test.dart

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.integration.server.shutdown; 5 library test.integration.server.shutdown;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:test/test.dart';
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; 10 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 import 'package:unittest/unittest.dart';
11 11
12 import '../../utils.dart'; 12 import '../../utils.dart';
13 import '../integration_tests.dart'; 13 import '../integration_tests.dart';
14 14
15 main() { 15 main() {
16 initializeTestEnvironment(); 16 initializeTestEnvironment();
17 defineReflectiveTests(Test); 17 defineReflectiveSuite(() {
18 defineReflectiveTests(Test);
19 });
18 } 20 }
19 21
20 @reflectiveTest 22 @reflectiveTest
21 class Test extends AbstractAnalysisServerIntegrationTest { 23 class Test extends AbstractAnalysisServerIntegrationTest {
22 test_shutdown() { 24 test_shutdown() {
23 return sendServerShutdown().then((_) { 25 return sendServerShutdown().then((_) {
24 return new Future.delayed(new Duration(seconds: 1)).then((_) { 26 return new Future.delayed(new Duration(seconds: 1)).then((_) {
25 sendServerGetVersion().then((_) { 27 sendServerGetVersion().then((_) {
26 fail('Server still alive after server.shutdown'); 28 fail('Server still alive after server.shutdown');
27 }); 29 });
28 // Give the server time to respond before terminating the test. 30 // Give the server time to respond before terminating the test.
29 return new Future.delayed(new Duration(seconds: 1)); 31 return new Future.delayed(new Duration(seconds: 1));
30 }); 32 });
31 }); 33 });
32 } 34 }
33 } 35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698