Skip to content

Commit 7d7af3b

Browse files
brianquinlanCommit Queue
authored andcommitted
[io] Remove assertion for socket timeout exception contents.
Change-Id: I91648caa2d5e53013a1f53412ec5478f5bf4b719 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413326 Commit-Queue: Brian Quinlan <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 388f22a commit 7d7af3b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tests/standalone/io/secure_socket_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ Future test(String certType, String password) {
9898
void testConnectTimeout() {
9999
asyncStart();
100100
Duration timeout = new Duration(milliseconds: 0);
101+
// TODO(https://github.com/dart-lang/sdk/issues/60246): ensure that the
102+
// exception was really caused by a timeout.
101103
SecureSocket.connect("8.8.8.7", 80, timeout: timeout)
102104
.then((socket) {
103105
Expect.fail("Unexpected connection made.");
104106
asyncEnd();
105107
})
106108
.catchError((e) {
107109
Expect.isTrue(e is SocketException);
108-
Expect.equals(Platform.isWindows? 10060 : 110, (e as SocketException).osError?.errorCode);
109110
asyncEnd();
110111
});
111112
}

tests/standalone/io/socket_connect_timeout_test.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ import "package:expect/expect.dart";
1616
void main() {
1717
asyncStart();
1818
Duration timeout = new Duration(milliseconds: 0);
19+
// TODO(https://github.com/dart-lang/sdk/issues/60246): ensure that the
20+
// exception was really caused by a timeout.
1921
Socket.connect("8.8.8.7", 80, timeout: timeout)
2022
.then((socket) {
2123
Expect.fail("Unexpected connection made.");
2224
asyncEnd();
2325
})
2426
.catchError((e) {
2527
Expect.isTrue(e is SocketException);
26-
Expect.equals(
27-
Platform.isWindows ? 10060 : 110,
28-
(e as SocketException).osError?.errorCode,
29-
);
3028
asyncEnd();
3129
});
3230
}

0 commit comments

Comments
 (0)