uses explicit type in "Should retrieve block expiration information" test

This commit is contained in:
Marcin Czenko 2025-06-03 02:55:08 +02:00
parent 7eb2fb12cc
commit a48af48210
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0
2 changed files with 7 additions and 4 deletions

View File

@ -37,6 +37,7 @@ runs:
sudo apt-get update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \
--no-install-recommends -yq lcov
sudo apt install libpcre3
- name: APT (Linux i386)
if: inputs.os == 'linux' && inputs.cpu == 'i386'
@ -83,7 +84,7 @@ runs:
- name: Install gcc 14 on Linux
# We don't want to install gcc 14 for coverage (Ubuntu 20.04)
if : ${{ inputs.os == 'linux' && inputs.coverage != 'true' }}
if: ${{ inputs.os == 'linux' && inputs.coverage != 'true' }}
shell: ${{ inputs.shell }} {0}
run: |
# Skip for older Ubuntu versions
@ -202,7 +203,7 @@ runs:
- name: Restore Nim toolchain binaries from cache
id: nim-cache
uses: actions/cache@v4
if : ${{ inputs.coverage != 'true' }}
if: ${{ inputs.coverage != 'true' }}
with:
path: NimBinaries
key: ${{ inputs.os }}-${{ inputs.cpu }}-nim-${{ inputs.nim_version }}-cache-${{ env.cache_nonce }}-${{ github.run_id }}

View File

@ -293,10 +293,12 @@ asyncchecksuite "RepoStore":
test "Should retrieve block expiration information":
proc unpack(
beIter: Future[?!SafeAsyncIter[BlockExpiration]]
): Future[seq[BlockExpiration]] {.async: (raises: [CatchableError]).} =
beIter: Future[?!SafeAsyncIter[BlockExpiration]].Raising([CancelledError])
): Future[seq[BlockExpiration]] {.async: (raises: [CancelledError]).} =
var expirations = newSeq[BlockExpiration](0)
without iter =? (await beIter), err:
info "Failed to get BlockExpiration async iterator, returning empty sequence",
err = err.msg
return expirations
for beFut in toSeq(iter):
if value =? (await beFut):