Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: runtime/observatory/tests/service/get_ports_rpc_test.dart

Issue 2681583002: Fix get_ports_rpc_test to be insensitive to system level ports (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/get_ports_rpc_test.dart
diff --git a/runtime/observatory/tests/service/get_ports_rpc_test.dart b/runtime/observatory/tests/service/get_ports_rpc_test.dart
index 7e977edaf88a47ca84421a16f62b9d9e46d9d444..44a04d215ef2dfd12ffd176a7a9d2f0255787ac0 100644
--- a/runtime/observatory/tests/service/get_ports_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_ports_rpc_test.dart
@@ -44,11 +44,11 @@ var tests = [
expect(result['type'], equals('_Ports'));
expect(result['ports'], isList);
var ports = result['ports'];
- // There are three ports: the two created in warmup and the stdin listener
- // created by the test harness.
- expect(ports.length, equals(3));
- expect(countHandlerMatches(ports, nullMatcher), equals(1));
- expect(countHandlerMatches(ports, closureMatcher), equals(2));
+ // There are at least two ports: the two created in warm up. Some OSes
+ // will have other ports open but we do not try and test for these.
+ expect(ports.length, greaterThanOrEqualTo(2));
+ expect(countHandlerMatches(ports, nullMatcher), greaterThanOrEqualTo(1));
+ expect(countHandlerMatches(ports, closureMatcher), greaterThanOrEqualTo(1));
},
];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698