mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-05 15:03:07 +00:00
uses explicit type in "Should retrieve block expiration information" test
This commit is contained in:
parent
7eb2fb12cc
commit
a48af48210
@ -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 }}
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user