Skip to content

Use a timeout factor of 3 in the integration test #3573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions test/end2end/dartdoc_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// 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.

library dartdoc.dartdoc_integration_test;
@Timeout.factor(3)
library;

import 'dart:async';
import 'dart:io';
Expand Down Expand Up @@ -48,7 +49,7 @@ void main() {
contains('package:test_package has no documentable libraries')),
);
await process.shouldExit(0);
}, timeout: Timeout.factor(2));
});

group('invoking dartdoc on a basic package', () {
late String packagePath;
Expand All @@ -70,7 +71,7 @@ void main() {
await process.shouldExit(0);
var docs = Directory(path.join(packagePath, 'doc', 'api'));
expect(docs.existsSync(), isFalse);
}, timeout: Timeout.factor(2));
});

test('with --quiet is quiet and does generate docs', () async {
var process = await runDartdoc(
Expand All @@ -83,7 +84,7 @@ void main() {
await process.shouldExit(0);
var indexHtml = Directory(path.join(packagePath, 'doc', 'api'));
expect(indexHtml.listSync(), isNotEmpty);
}, timeout: Timeout.factor(2));
});

test('with invalid options return non-zero and print a fatal-error',
() async {
Expand Down Expand Up @@ -150,8 +151,8 @@ void main() {
emitsThrough(
'{"level":"WARNING","message":"Found 1 warning and 0 errors."}'));
await process.shouldExit(0);
}, timeout: Timeout.factor(2));
}, timeout: Timeout.factor(8));
});
});

test('with tool errors cause non-zero exit when warnings are off', () async {
// TODO(srawlins): Remove test_package_tool_error and generate afresh.
Expand All @@ -171,7 +172,7 @@ void main() {
workingDirectory: packagePath,
);
await process.shouldExit(1);
}, timeout: Timeout.factor(2));
});

test('with missing FLUTTER_ROOT exception reports an error', () async {
// TODO(srawlins): Remove test_package_flutter_plugin and generate afresh.
Expand All @@ -185,10 +186,15 @@ void main() {
includeParentEnvironment: false,
);
await expectLater(
process.stderr,
emitsThrough(matches(
'Top level package requires Flutter but FLUTTER_ROOT environment variable not set|'
'test_package_flutter_plugin requires the Flutter SDK, version solving failed')));
process.stderr,
emitsThrough(
matches(
'Top level package requires Flutter but FLUTTER_ROOT environment '
'variable not set|test_package_flutter_plugin requires the Flutter '
'SDK, version solving failed',
),
),
);
await process.shouldExit(1);
});
}