Ignore test pid on windows (#2630)

The tests are flaky or always failing due to inconsistencies with PID
behavior on windows. Change the PID expectation argument to take a
matcher and use `anything` on windows.
diff --git a/pkgs/test/test/runner/json_file_reporter_test.dart b/pkgs/test/test/runner/json_file_reporter_test.dart
index ae4db2e..dc37b24 100644
--- a/pkgs/test/test/runner/json_file_reporter_test.dart
+++ b/pkgs/test/test/runner/json_file_reporter_test.dart
@@ -180,7 +180,7 @@
   ).readAsLinesSync();
   await expectJsonReport(
     fileOutputLines,
-    test.pid,
+    Platform.isWindows ? anything : equals(test.pid),
     jsonFileExpected,
     jsonFileDone,
   );
diff --git a/pkgs/test/test/runner/json_reporter_test.dart b/pkgs/test/test/runner/json_reporter_test.dart
index b01c394..41d978b 100644
--- a/pkgs/test/test/runner/json_reporter_test.dart
+++ b/pkgs/test/test/runner/json_reporter_test.dart
@@ -6,6 +6,7 @@
 library;
 
 import 'dart:async';
+import 'dart:io';
 
 import 'package:path/path.dart' as p;
 import 'package:test/test.dart';
@@ -908,5 +909,10 @@
   await test.shouldExit();
 
   var stdoutLines = await test.stdoutStream().toList();
-  return expectJsonReport(stdoutLines, test.pid, expected, done);
+  return expectJsonReport(
+    stdoutLines,
+    Platform.isWindows ? anything : equals(test.pid),
+    expected,
+    done,
+  );
 }
diff --git a/pkgs/test/test/runner/json_reporter_utils.dart b/pkgs/test/test/runner/json_reporter_utils.dart
index e064c02..d10dc68 100644
--- a/pkgs/test/test/runner/json_reporter_utils.dart
+++ b/pkgs/test/test/runner/json_reporter_utils.dart
@@ -15,7 +15,7 @@
 /// includes the [testPid] from the test process, and ends with [done].
 Future<void> expectJsonReport(
   List<String> outputLines,
-  int testPid,
+  Matcher testPid,
   List<List<Object /*Map|Matcher*/>> expected,
   Map<Object, Object> done,
 ) async {