From 606d8b2f6d0ed4c26d44d2b07b8fef39cabc0b3c Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 15 May 2018 00:12:44 +0300 Subject: Added test --- tests/stdlib/thttpclient.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/stdlib/thttpclient.nim') 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" -- cgit 1.4.1-2-gfad0