Skip to content

Commit

Permalink
Add debug logging to deferred components test for deflaking (#103161)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryQian authored May 6, 2022
1 parent 8094263 commit 1b16d23
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'test_data/deferred_components_project.dart';
import 'test_driver.dart';
import 'test_utils.dart';


void main() {
late Directory tempDir;
late FlutterRunTestDriver flutter;
Expand All @@ -38,6 +39,8 @@ void main() {
'--target-platform=android-arm64',
], workingDirectory: tempDir.path);

printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.exitCode, 0);
expect(result.stdout.toString(), contains('app-release.aab'));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
Expand Down Expand Up @@ -72,6 +75,8 @@ void main() {
'appbundle',
], workingDirectory: tempDir.path);

printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.stdout.toString(), contains('app-release.aab'));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
Expand Down Expand Up @@ -116,6 +121,8 @@ void main() {
'--no-deferred-components',
], workingDirectory: tempDir.path);

printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.stdout.toString().contains('app-release.aab'), true);
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
Expand Down Expand Up @@ -162,6 +169,8 @@ void main() {
'--no-validate-deferred-components',
], workingDirectory: tempDir.path);

printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.stdout.toString().contains('app-release.aab'), true);
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
Expand Down

0 comments on commit 1b16d23

Please sign in to comment.