[ Widget Preview ] Move preview_detector_test.dart from general.shard to commands.shard (#163619)

Tests under the `general.shard` have a 2000ms timeout and these tests
write to the real file system and watch directories for changes. This
can be slow on heavily loaded machines and cause flaky failures.
This commit is contained in:
Ben Konyi 2025-02-19 17:53:35 -05:00 committed by GitHub
parent 72cc1d198c
commit 9c7e2c2563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View File

@ -11,8 +11,13 @@ import 'package:flutter_tools/src/base/signals.dart';
import 'package:flutter_tools/src/widget_preview/preview_detector.dart';
import 'package:test/test.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../../src/common.dart';
import '../../../src/context.dart';
// Note: this test isn't under the general.shard since tests under that directory
// have a 2000ms time out and these tests write to the real file system and watch
// directories for changes. This can be slow on heavily loaded machines and cause
// flaky failures.
Directory createBasicProjectStructure(FileSystem fs) {
return fs.systemTempDirectory.createTempSync('root');

View File

@ -16,9 +16,9 @@ import 'package:flutter_tools/src/project.dart';
import 'package:test/test.dart';
import 'package:test_api/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fakes.dart';
import '../../../src/common.dart';
import '../../../src/context.dart';
import '../../../src/fakes.dart';
void main() {
group('WidgetPreviewStartCommand', () {