We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
connected_app_service_test.dart
1 parent 247ae23 commit 4115083Copy full SHA for 4115083
pkg/dtd/test/utils.dart
@@ -70,7 +70,6 @@ class DartCliAppProcess {
70
71
Future<TestProcess> start() async {
72
final tmpDir = Directory.systemTemp.createTempSync();
73
- addTearDown(() => tmpDir.deleteSync(recursive: true));
74
75
// A simple Dart command line app that will never exit.
76
const fileName = 'app.dart';
@@ -97,6 +96,10 @@ void main() async {
97
96
98
addTearDown(() async {
99
await process!.kill();
+ // Delete [tmpDir] after [process] is killed. Otherwise, the call to
100
+ // `tmpDir.deleteSync` may fail with an error: "The process cannot access
101
+ // the file because it is being used by another process."
102
+ tmpDir.deleteSync(recursive: true);
103
});
104
105
String? uri;
0 commit comments