| OLD | NEW | 
|---|
| 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:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; | 
| 10 | 10 | 
| 11 import '../../reflective_tests.dart'; | 11 import '../../reflective_tests.dart'; | 
| 12 import '../integration_tests.dart'; | 12 import '../integration_tests.dart'; | 
| 13 | 13 | 
| 14 main() { | 14 main() { | 
| 15   runReflectiveTests(Test); | 15   runReflectiveTests(Test); | 
| 16 } | 16 } | 
| 17 | 17 | 
| 18 @ReflectiveTestCase() | 18 @reflectiveTest | 
| 19 class Test extends AbstractAnalysisServerIntegrationTest { | 19 class Test extends AbstractAnalysisServerIntegrationTest { | 
| 20   test_shutdown() { | 20   test_shutdown() { | 
| 21     return sendServerShutdown().then((_) { | 21     return sendServerShutdown().then((_) { | 
| 22       return new Future.delayed(new Duration(seconds: 1)).then((_) { | 22       return new Future.delayed(new Duration(seconds: 1)).then((_) { | 
| 23         sendServerGetVersion().then((_) { | 23         sendServerGetVersion().then((_) { | 
| 24           fail('Server still alive after server.shutdown'); | 24           fail('Server still alive after server.shutdown'); | 
| 25         }); | 25         }); | 
| 26         // Give the server time to respond before terminating the test. | 26         // Give the server time to respond before terminating the test. | 
| 27         return new Future.delayed(new Duration(seconds: 1)); | 27         return new Future.delayed(new Duration(seconds: 1)); | 
| 28       }); | 28       }); | 
| 29     }); | 29     }); | 
| 30   } | 30   } | 
| 31 } | 31 } | 
| OLD | NEW | 
|---|