Unverified Commit 244b077b authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Give integration tests unique temp folder names (#26227)

This will help track down any that aren't cleaning up and also may help track down leaked flutter_tester processes (https://github.com/dart-lang/sdk/issues/35549).
parent c74b59a5
...@@ -22,7 +22,7 @@ void main() { ...@@ -22,7 +22,7 @@ void main() {
Process process; Process process;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('daemon_mode_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
}); });
......
...@@ -17,7 +17,7 @@ void main() { ...@@ -17,7 +17,7 @@ void main() {
FlutterRunTestDriver _flutter; FlutterRunTestDriver _flutter;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('debugger_stepping_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutter = FlutterRunTestDriver(tempDir); _flutter = FlutterRunTestDriver(tempDir);
}); });
......
...@@ -22,7 +22,7 @@ void main() { ...@@ -22,7 +22,7 @@ void main() {
FlutterRunTestDriver _flutter; FlutterRunTestDriver _flutter;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('expression_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutter = FlutterRunTestDriver(tempDir); _flutter = FlutterRunTestDriver(tempDir);
}); });
...@@ -87,7 +87,7 @@ void main() { ...@@ -87,7 +87,7 @@ void main() {
FlutterTestTestDriver _flutter; FlutterTestTestDriver _flutter;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('test_expression_eval_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutter = FlutterTestTestDriver(tempDir); _flutter = FlutterTestTestDriver(tempDir);
}); });
......
...@@ -16,7 +16,7 @@ void main() { ...@@ -16,7 +16,7 @@ void main() {
Directory tempDir; Directory tempDir;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('attach_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutterRun = FlutterRunTestDriver(tempDir, logPrefix: 'RUN'); _flutterRun = FlutterRunTestDriver(tempDir, logPrefix: 'RUN');
_flutterAttach = FlutterRunTestDriver(tempDir, logPrefix: 'ATTACH'); _flutterAttach = FlutterRunTestDriver(tempDir, logPrefix: 'ATTACH');
......
...@@ -19,7 +19,7 @@ void main() { ...@@ -19,7 +19,7 @@ void main() {
FlutterRunTestDriver _flutter; FlutterRunTestDriver _flutter;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('run_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutter = FlutterRunTestDriver(tempDir); _flutter = FlutterRunTestDriver(tempDir);
}); });
......
...@@ -20,7 +20,7 @@ void main() { ...@@ -20,7 +20,7 @@ void main() {
FlutterRunTestDriver _flutter; FlutterRunTestDriver _flutter;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('hot_reload_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutter = FlutterRunTestDriver(tempDir); _flutter = FlutterRunTestDriver(tempDir);
}); });
......
...@@ -24,7 +24,7 @@ void main() { ...@@ -24,7 +24,7 @@ void main() {
Directory tempDir; Directory tempDir;
setUp(() async { setUp(() async {
tempDir = createResolvedTempDirectorySync(); tempDir = createResolvedTempDirectorySync('lifetime_test.');
await _project.setUpIn(tempDir); await _project.setUpIn(tempDir);
_flutter = FlutterRunTestDriver(tempDir); _flutter = FlutterRunTestDriver(tempDir);
}); });
......
...@@ -14,8 +14,8 @@ import '../src/common.dart'; ...@@ -14,8 +14,8 @@ import '../src/common.dart';
/// Creates a temporary directory but resolves any symlinks to return the real /// Creates a temporary directory but resolves any symlinks to return the real
/// underlying path to avoid issues with breakpoints/hot reload. /// underlying path to avoid issues with breakpoints/hot reload.
/// https://github.com/flutter/flutter/pull/21741 /// https://github.com/flutter/flutter/pull/21741
Directory createResolvedTempDirectorySync() { Directory createResolvedTempDirectorySync(String prefix) {
final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_expression_test.'); final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_$prefix');
return fs.directory(tempDir.resolveSymbolicLinksSync()); return fs.directory(tempDir.resolveSymbolicLinksSync());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment