Unverified Commit b7a268fe authored by Devon Carew's avatar Devon Carew Committed by GitHub

increase the timeout for analyze_once_test tests (#17845)

parent 66b50ed0
...@@ -16,6 +16,9 @@ import 'package:test/test.dart'; ...@@ -16,6 +16,9 @@ import 'package:test/test.dart';
import '../src/common.dart'; import '../src/common.dart';
import '../src/context.dart'; import '../src/context.dart';
/// Test case timeout for tests involving project analysis.
const Timeout allowForSlowAnalyzeTests = const Timeout.factor(5.0);
void main() { void main() {
final String analyzerSeparator = platform.isWindows ? '-' : '•'; final String analyzerSeparator = platform.isWindows ? '-' : '•';
...@@ -60,7 +63,7 @@ void main() { ...@@ -60,7 +63,7 @@ void main() {
arguments: <String>['analyze'], arguments: <String>['analyze'],
statusTextContains: <String>['No issues found!'], statusTextContains: <String>['No issues found!'],
); );
}, timeout: const Timeout.factor(2.0)); }, timeout: allowForSlowAnalyzeTests);
// Analyze a specific file outside the current directory // Analyze a specific file outside the current directory
testUsingContext('passing one file throws', () async { testUsingContext('passing one file throws', () async {
...@@ -102,7 +105,7 @@ void main() { ...@@ -102,7 +105,7 @@ void main() {
], ],
toolExit: true, toolExit: true,
); );
}, timeout: const Timeout.factor(2.0)); }, timeout: allowForSlowAnalyzeTests);
// Analyze in the current directory - no arguments // Analyze in the current directory - no arguments
testUsingContext('working directory with local options', () async { testUsingContext('working directory with local options', () async {
...@@ -129,7 +132,7 @@ void main() { ...@@ -129,7 +132,7 @@ void main() {
], ],
toolExit: true, toolExit: true,
); );
}, timeout: const Timeout.factor(2.0)); }, timeout: allowForSlowAnalyzeTests);
testUsingContext('no duplicate issues', () async { testUsingContext('no duplicate issues', () async {
final Directory tempDir = fs.systemTempDirectory.createTempSync('analyze_once_test_').absolute; final Directory tempDir = fs.systemTempDirectory.createTempSync('analyze_once_test_').absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment