Chromium Code Reviews| Index: pkg/analysis_server/test/integration/analysis/analysis_options_test.dart |
| diff --git a/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart b/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart |
| index b43679ede2ba12dd5b49290a0e5694e528bb38cb..c39cf1a190db98a06fe09d1d8a4efe36880dcee9 100644 |
| --- a/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart |
| +++ b/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart |
| @@ -2,8 +2,6 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| -import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| -import 'package:analyzer/src/generated/engine.dart'; |
| import 'package:test/test.dart'; |
| import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| @@ -12,88 +10,74 @@ import '../integration_tests.dart'; |
| main() { |
| defineReflectiveSuite(() { |
| defineReflectiveTests(OptionsIntegrationTest); |
| - defineReflectiveTests(OptionsIntegrationTest_Driver); |
| }); |
| } |
| -class AbstractOptionsIntegrationTest |
| - extends AbstractAnalysisServerIntegrationTest { |
| - test_option_warning_newOptionFile() async { |
| - String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE); |
| - writeFile( |
| - options, |
| - ''' |
| -linter: |
| - rules: |
| - - camel_case_typo # :) |
| -'''); |
| - |
| - standardAnalysisSetup(); |
| - |
| - await analysisFinished; |
| - |
| - expect(currentAnalysisErrors[options], isList); |
| - List<AnalysisError> errors = currentAnalysisErrors[options]; |
| - expect(errors, hasLength(1)); |
| - AnalysisError error = errors[0]; |
| - expect(error.location.file, options); |
| - expect(error.severity, AnalysisErrorSeverity.WARNING); |
| - expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| - expect(error.location.offset, 23); |
| - expect(error.location.length, 'camel_case_typo'.length); |
| - expect(error.location.startLine, 3); |
| - expect(error.location.startColumn, 7); |
| - } |
| - |
| - test_option_warning_oldOptionFile() async { |
| - String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_FILE); |
| - writeFile( |
| - options, |
| - ''' |
| -linter: |
| - rules: |
| - - camel_case_typo # :) |
| -'''); |
| - |
| - standardAnalysisSetup(); |
| - |
| - await analysisFinished; |
| - |
| - expect(currentAnalysisErrors[options], isList); |
| - List<AnalysisError> errors = currentAnalysisErrors[options]; |
| - expect(errors, hasLength(1)); |
| - AnalysisError error = errors[0]; |
| - expect(error.location.file, options); |
| - expect(error.severity, AnalysisErrorSeverity.WARNING); |
| - expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| - expect(error.location.offset, 23); |
| - expect(error.location.length, 'camel_case_typo'.length); |
| - expect(error.location.startLine, 3); |
| - expect(error.location.startColumn, 7); |
| - } |
| -} |
| - |
| -@reflectiveTest |
| -class OptionsIntegrationTest extends AbstractOptionsIntegrationTest {} |
| - |
| @reflectiveTest |
| -class OptionsIntegrationTest_Driver extends AbstractOptionsIntegrationTest { |
| - @override |
| - bool get enableNewAnalysisDriver => true; |
| - |
| +class OptionsIntegrationTest extends AbstractAnalysisServerIntegrationTest { |
| @failingTest |
| test_option_warning_newOptionFile() async { |
| // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds |
| // (#28868). |
| - //return super.test_option_warning_newOptionFile(); |
| - fail('Test timed out'); |
| + |
| + fail('test timeout expected - #28868'); |
| + |
| +// String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE); |
|
Brian Wilkerson
2017/04/17 16:53:52
Given that 'fail' will throw an exception and none
devoncarew
2017/04/17 18:21:58
Ah, great point. Will update to uncomment.
|
| +// writeFile( |
| +// options, |
| +// ''' |
| +//linter: |
| +// rules: |
| +// - camel_case_typo # :) |
| +//'''); |
| +// |
| +// standardAnalysisSetup(); |
| +// |
| +// await analysisFinished; |
| +// |
| +// expect(currentAnalysisErrors[options], isList); |
| +// List<AnalysisError> errors = currentAnalysisErrors[options]; |
| +// expect(errors, hasLength(1)); |
| +// AnalysisError error = errors[0]; |
| +// expect(error.location.file, options); |
| +// expect(error.severity, AnalysisErrorSeverity.WARNING); |
| +// expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| +// expect(error.location.offset, 23); |
| +// expect(error.location.length, 'camel_case_typo'.length); |
| +// expect(error.location.startLine, 3); |
| +// expect(error.location.startColumn, 7); |
| } |
| @failingTest |
| test_option_warning_oldOptionFile() async { |
| // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds |
| // (#28868). |
| - //return super.test_option_warning_oldOptionFile(); |
| - fail('Test timed out'); |
| + |
| + fail('test timeout expected - #28868'); |
| + |
| +// String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_FILE); |
| +// writeFile( |
| +// options, |
| +// ''' |
| +//linter: |
| +// rules: |
| +// - camel_case_typo # :) |
| +//'''); |
| +// |
| +// standardAnalysisSetup(); |
| +// |
| +// await analysisFinished; |
| +// |
| +// expect(currentAnalysisErrors[options], isList); |
| +// List<AnalysisError> errors = currentAnalysisErrors[options]; |
| +// expect(errors, hasLength(1)); |
| +// AnalysisError error = errors[0]; |
| +// expect(error.location.file, options); |
| +// expect(error.severity, AnalysisErrorSeverity.WARNING); |
| +// expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| +// expect(error.location.offset, 23); |
| +// expect(error.location.length, 'camel_case_typo'.length); |
| +// expect(error.location.startLine, 3); |
| +// expect(error.location.startColumn, 7); |
| } |
| } |