[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 <bquinlan@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
388f22a88b
commit
7d7af3bf09
@@ -98,6 +98,8 @@ Future test(String certType, String password) {
|
||||
void testConnectTimeout() {
|
||||
asyncStart();
|
||||
Duration timeout = new Duration(milliseconds: 0);
|
||||
// TODO(https://github.com/dart-lang/sdk/issues/60246): ensure that the
|
||||
// exception was really caused by a timeout.
|
||||
SecureSocket.connect("8.8.8.7", 80, timeout: timeout)
|
||||
.then((socket) {
|
||||
Expect.fail("Unexpected connection made.");
|
||||
@@ -105,7 +107,6 @@ void testConnectTimeout() {
|
||||
})
|
||||
.catchError((e) {
|
||||
Expect.isTrue(e is SocketException);
|
||||
Expect.equals(Platform.isWindows? 10060 : 110, (e as SocketException).osError?.errorCode);
|
||||
asyncEnd();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ import "package:expect/expect.dart";
|
||||
void main() {
|
||||
asyncStart();
|
||||
Duration timeout = new Duration(milliseconds: 0);
|
||||
// TODO(https://github.com/dart-lang/sdk/issues/60246): ensure that the
|
||||
// exception was really caused by a timeout.
|
||||
Socket.connect("8.8.8.7", 80, timeout: timeout)
|
||||
.then((socket) {
|
||||
Expect.fail("Unexpected connection made.");
|
||||
@@ -23,10 +25,6 @@ void main() {
|
||||
})
|
||||
.catchError((e) {
|
||||
Expect.isTrue(e is SocketException);
|
||||
Expect.equals(
|
||||
Platform.isWindows ? 10060 : 110,
|
||||
(e as SocketException).osError?.errorCode,
|
||||
);
|
||||
asyncEnd();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user