Skip to content

Commit

Permalink
Comment out flaky test in tests/stdlib/thttpclient (#23772)
Browse files Browse the repository at this point in the history
```
$ curl -v http://example.com/404 |& grep 'HTTP/1.1'
> GET /404 HTTP/1.1
< HTTP/1.1 500 Internal Server Error
```

So, the test with http://example.com/404 should be disabled, I think.
  • Loading branch information
alex65536 authored Jun 29, 2024
1 parent 179897e commit c88894b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/stdlib/thttpclient.nim
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ proc asyncTest() {.async.} =
doAssert("<title>Example Domain</title>" in body)

resp = await client.request("http://example.com/404")
doAssert(resp.code.is4xx)
doAssert(resp.code == Http404)
doAssert(resp.status == $Http404)
doAssert(resp.code.is4xx or resp.code.is5xx)
doAssert(resp.code == Http404 or resp.code == Http500)
doAssert(resp.status == $Http404 or resp.status == $Http500)

when false: # occasionally does not give success code
resp = await client.request("https://google.com/")
Expand Down Expand Up @@ -115,9 +115,9 @@ proc syncTest() =
doAssert("<title>Example Domain</title>" in resp.body)

resp = client.request("http://example.com/404")
doAssert(resp.code.is4xx)
doAssert(resp.code == Http404)
doAssert(resp.status == $Http404)
doAssert(resp.code.is4xx or resp.code.is5xx)
doAssert(resp.code == Http404 or resp.code == Http500)
doAssert(resp.status == $Http404 or resp.status == $Http500)

when false: # occasionally does not give success code
resp = client.request("https://google.com/")
Expand Down

0 comments on commit c88894b

Please sign in to comment.