fix failing test in torrentdownloader

This commit is contained in:
Marcin Czenko 2025-03-31 15:07:51 +02:00
parent 6000ae5e07
commit e3fd2fada8
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0
2 changed files with 2 additions and 4 deletions

View File

@ -218,7 +218,6 @@ proc getNext*(
except CancelledError as e:
trace "Getting next block from downloader cancelled"
raise e
# return success((-1, newSeq[byte]()))
except CatchableError as e:
warn "Could not get block from local store", error = e.msg
return failure("Could not get block from local store: " & e.msg)

View File

@ -235,6 +235,5 @@ asyncchecksuite "Torrent Downloader":
assert dataFut.finished
let (blockIndex, data) = dataFut.read.tryGet()
check blockIndex == -1
check data.len == 0
expect CancelledError:
discard await dataFut