Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Dec 30, 2024
1 parent eb41d33 commit 52c8ba4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/functional/tmisc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,19 @@ testAsync "lazy client stream id":
doAssert order[] == @[100, 200]
checked[] += 1
doAssert checked[] == 5

testAsync "cancel lazy stream":
var checked = 0
var client = newClient(localHost, localPort)
with client:
let strm = client.newClientStream()
await strm.cancel(hyxCancel)
with strm:
try:
await strm.sendHeaders(defaultHeaders, finish = true)
doAssert false
except HyperxStrmError as err:
doAssert err.code == hyxStreamClosed
inc checked
inc checked
doAssert checked == 2

0 comments on commit 52c8ba4

Please sign in to comment.