summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-03-27 02:22:42 -0700
committerGitHub <noreply@github.com>2021-03-27 10:22:42 +0100
commit8ed6de4fe6517dc4db38ab5dea898c0016d1c08a (patch)
treef0b123290da969e167512f7834ee4d6362385f7e /tests/stdlib
parentb1b767ed0db19b337ab41fab9241227d23aaae38 (diff)
downloadNim-8ed6de4fe6517dc4db38ab5dea898c0016d1c08a.tar.gz
fix flaky tnetconnect which sometimes failed with: No route to host [OSError] (#17526)
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/tnetconnect.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/stdlib/tnetconnect.nim b/tests/stdlib/tnetconnect.nim
index b74545710..3a80df19f 100644
--- a/tests/stdlib/tnetconnect.nim
+++ b/tests/stdlib/tnetconnect.nim
@@ -17,10 +17,11 @@ proc test() =
     wrapSocket(ctx, socket)
 
   # trying 2 sites makes it more resilent: refs #17458 this could give:
-  # Error: unhandled exception: Call to 'connect' timed out. [TimeoutError]
+  # * Call to 'connect' timed out. [TimeoutError]
+  # * No route to host [OSError]
   try:
     fn("www.nim-lang.org")
-  except TimeoutError:
+  except TimeoutError, OSError:
     fn("www.google.com")
 
 test()