Skip to content

[flutter_migrate] Skip slow tests #3270

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
Show file tree
Hide file tree
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
15 changes: 12 additions & 3 deletions packages/flutter_migrate/test/compute_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ void main() {
.existsSync(),
false);
}, timeout: const Timeout(Duration(seconds: 500)));
});
},
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: 'TODO: Speed up, or move to another type of test');

group('MigrateRevisions', () {
setUp(() async {
Expand Down Expand Up @@ -486,7 +489,10 @@ migration:
.baseRevision,
'36427af29421f406ac95ff55ea31d1dc49a45b5f');
});
});
},
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: 'TODO: Speed up, or move to another type of test');

group('project operations', () {
setUp(() async {
Expand Down Expand Up @@ -865,5 +871,8 @@ migration:
expect(result.mergeResults[10].hasConflict, false);
expect(result.mergeResults[11].hasConflict, false);
}, timeout: const Timeout(Duration(seconds: 500)));
});
},
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: 'TODO: Speed up, or move to another type of test');
}
24 changes: 20 additions & 4 deletions packages/flutter_migrate/test/migrate_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ Modified files:
.existsSync(),
true);
expect(tempDir.childFile('analysis_options.yaml').existsSync(), true);
}, timeout: const Timeout(Duration(seconds: 500)), skip: isWindows);
},
timeout: const Timeout(Duration(seconds: 500)),
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: true);

// Migrates a clean untouched app generated with flutter create
testUsingContext('vanilla migrate builds', () async {
Expand Down Expand Up @@ -167,7 +171,11 @@ class MyApp extends StatelessWidget {
// Skipped due to being flaky, the build completes successfully, but sometimes
// Gradle crashes due to resources on the bot. We should fine tune this to
// make it stable.
}, timeout: const Timeout(Duration(seconds: 900)), skip: true);
},
timeout: const Timeout(Duration(seconds: 900)),
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: true);

testUsingContext('migrate abandon', () async {
// Abandon in an empty dir fails.
Expand Down Expand Up @@ -209,7 +217,11 @@ class MyApp extends StatelessWidget {
], workingDirectory: tempDir.path);
expect(result.exitCode, 0);
expect(result.stdout.toString(), contains('Abandon complete'));
}, timeout: const Timeout(Duration(seconds: 300)));
},
timeout: const Timeout(Duration(seconds: 300)),
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: true);

// Migrates a user-modified app
testUsingContext('modified migrate process succeeds', () async {
Expand Down Expand Up @@ -436,5 +448,9 @@ flutter:
.existsSync(),
true);
expect(tempDir.childFile('analysis_options.yaml').existsSync(), true);
}, timeout: const Timeout(Duration(seconds: 500)), skip: isWindows);
},
timeout: const Timeout(Duration(seconds: 500)),
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: true);
}
6 changes: 5 additions & 1 deletion packages/flutter_migrate/test/utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ void main() {

projectRoot.deleteSync(recursive: true);
});
}, timeout: const Timeout(Duration(seconds: 500)));
},
timeout: const Timeout(Duration(seconds: 500)),
// TODO(stuartmorgan): These should not be unit tests, see
// https://github.com/flutter/flutter/issues/121257.
skip: 'TODO: Speed up, or move to another type of test');

testWithoutContext('conflictsResolved', () async {
expect(utils.conflictsResolved(''), true);
Expand Down