summary refs log tree commit diff stats
diff options
context:
space:
mode:
authordata-man <datamanrb@gmail.com>2018-05-15 00:12:44 +0300
committerdata-man <datamanrb@gmail.com>2018-05-15 00:12:44 +0300
commit606d8b2f6d0ed4c26d44d2b07b8fef39cabc0b3c (patch)
tree0091ac183c843552b14b271024970ea252b77c02
parent5e8faaf7103aed2a8098880e1f2410961546df21 (diff)
downloadNim-606d8b2f6d0ed4c26d44d2b07b8fef39cabc0b3c.tar.gz
Added test
-rw-r--r--tests/stdlib/thttpclient.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/stdlib/thttpclient.nim b/tests/stdlib/thttpclient.nim
index fff02722a..c28f09100 100644
--- a/tests/stdlib/thttpclient.nim
+++ b/tests/stdlib/thttpclient.nim
@@ -154,8 +154,20 @@ proc ipv6Test() =
   serverFd.closeSocket()
   client.close()
 
+proc longTimeoutTest() =
+# Issue #2753
+  try:
+    var client = newHttpClient(timeout = 1000)
+    var resp = client.request("https://au.yahoo.com")
+    client.close()
+  except AssertionError:
+    doAssert false, "Exceptions should not be raised"
+  except:
+    discard
+
 syncTest()
 waitFor(asyncTest())
 ipv6Test()
+longTimeoutTest()
 
 echo "OK"