Skip to content

Commit 13ee644

Browse files
[flutter_migrate] Skip slow tests (flutter#3270)
Currently `flutter_migrate` unit tests take 10 minutes to run, which is 1/6 of our total time allowance for a Cirrus test run, and 1-2 orders of magnitude slower than all of our other unit tests. This skips the slow tests, with references to a tracking issue. At some point when there are more eng resources on `flutter_migrate` someone can revisit these tests to speed them up and/or make them another type of test (such as a custom `run_tests` test). Part of flutter#121257
1 parent 3cc754a commit 13ee644

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

packages/flutter_migrate/test/compute_test.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ void main() {
251251
.existsSync(),
252252
false);
253253
}, timeout: const Timeout(Duration(seconds: 500)));
254-
});
254+
},
255+
// TODO(stuartmorgan): These should not be unit tests, see
256+
// https://github.com/flutter/flutter/issues/121257.
257+
skip: 'TODO: Speed up, or move to another type of test');
255258

256259
group('MigrateRevisions', () {
257260
setUp(() async {
@@ -486,7 +489,10 @@ migration:
486489
.baseRevision,
487490
'36427af29421f406ac95ff55ea31d1dc49a45b5f');
488491
});
489-
});
492+
},
493+
// TODO(stuartmorgan): These should not be unit tests, see
494+
// https://github.com/flutter/flutter/issues/121257.
495+
skip: 'TODO: Speed up, or move to another type of test');
490496

491497
group('project operations', () {
492498
setUp(() async {
@@ -865,5 +871,8 @@ migration:
865871
expect(result.mergeResults[10].hasConflict, false);
866872
expect(result.mergeResults[11].hasConflict, false);
867873
}, timeout: const Timeout(Duration(seconds: 500)));
868-
});
874+
},
875+
// TODO(stuartmorgan): These should not be unit tests, see
876+
// https://github.com/flutter/flutter/issues/121257.
877+
skip: 'TODO: Speed up, or move to another type of test');
869878
}

packages/flutter_migrate/test/migrate_test.dart

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ Modified files:
106106
.existsSync(),
107107
true);
108108
expect(tempDir.childFile('analysis_options.yaml').existsSync(), true);
109-
}, timeout: const Timeout(Duration(seconds: 500)), skip: isWindows);
109+
},
110+
timeout: const Timeout(Duration(seconds: 500)),
111+
// TODO(stuartmorgan): These should not be unit tests, see
112+
// https://github.com/flutter/flutter/issues/121257.
113+
skip: true);
110114

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

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

214226
// Migrates a user-modified app
215227
testUsingContext('modified migrate process succeeds', () async {
@@ -436,5 +448,9 @@ flutter:
436448
.existsSync(),
437449
true);
438450
expect(tempDir.childFile('analysis_options.yaml').existsSync(), true);
439-
}, timeout: const Timeout(Duration(seconds: 500)), skip: isWindows);
451+
},
452+
timeout: const Timeout(Duration(seconds: 500)),
453+
// TODO(stuartmorgan): These should not be unit tests, see
454+
// https://github.com/flutter/flutter/issues/121257.
455+
skip: true);
440456
}

packages/flutter_migrate/test/utils_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ void main() {
281281

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

286290
testWithoutContext('conflictsResolved', () async {
287291
expect(utils.conflictsResolved(''), true);

0 commit comments

Comments
 (0)