Fix test so it doesn't leak frontend_server process (#24360)

* Fix test so it doesn't leak frontend_server process

* Stop FlutterTestDriver even if expectation is not met
This commit is contained in:
Alexander Aprelev 2018-11-14 18:50:18 -08:00 committed by GitHub
parent e8eea83472
commit 64a8d44764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,11 @@ void main() {
test('writes pid-file', () async {
final File pidFile = tempDir.childFile('test.pid');
await _flutter.run(pidFile: pidFile);
expect(pidFile.existsSync(), isTrue);
try {
expect(pidFile.existsSync(), isTrue);
} finally {
await _flutter.stop();
}
});
}, timeout: const Timeout.factor(6));
}