TODO Audits - 1 (#53604)

This commit is contained in:
Kate Lovett
2020-03-31 11:21:01 -07:00
committed by GitHub
parent 9b6fd7cb0b
commit 560c72287b
6 changed files with 4 additions and 22 deletions

View File

@@ -97,7 +97,6 @@ class _TaskRunner {
for (final RunningProcessInfo info in afterRunningDartInstances) {
if (!beforeRunningDartInstances.contains(info)) {
print('$info was leaked by this test.');
// TODO(dnfield): remove this special casing after https://github.com/flutter/flutter/issues/29141 is resolved.
if (result is TaskResultCheckProcesses) {
result = TaskResult.failure('This test leaked dart processes');
}

View File

@@ -27,7 +27,7 @@ class RunningProcessInfo {
@override
int get hashCode {
// TODO(dnfield): Replace this when Object.hashValues lands.
// TODO(dnfield): Replace this when Object.hashValues lands, https://github.com/dart-lang/sdk/issues/11617
int hash = 17;
if (pid != null) {
hash = hash * 23 + pid.hashCode;
@@ -88,8 +88,7 @@ Stream<RunningProcessInfo> windowsRunningProcesses(String processName) async* {
? '"Get-CimInstance Win32_Process -Filter \\"name=\'$processName\'\\" | Select-Object ProcessId,CreationDate,CommandLine | Format-Table -AutoSize | Out-String -Width 4096"'
: '"Get-CimInstance Win32_Process | Select-Object ProcessId,CreationDate,CommandLine | Format-Table -AutoSize | Out-String -Width 4096"';
// Unfortunately, there doesn't seem to be a good way to get ProcessManager to
// run this. May be a bug in Dart.
// TODO(dnfield): fix this when https://github.com/dart-lang/sdk/issues/36175 is resolved.
// run this.
final ProcessResult result = await Process.run(
'powershell -command $script',
<String>[],