From fb4577f25ce13215d697942b481a0e0ee95bc71b Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:02:57 +0700 Subject: [PATCH] chore(tests): fix unneeded async (#1021) Removes an unneeded `check eventually` inside a helper proc, removing the need for the proc to be async. --- tests/codex/sales/testsales.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/codex/sales/testsales.nim b/tests/codex/sales/testsales.nim index b71c0531..518853ae 100644 --- a/tests/codex/sales/testsales.nim +++ b/tests/codex/sales/testsales.nim @@ -189,14 +189,16 @@ asyncchecksuite "Sales": await repoTmp.destroyDb() await metaTmp.destroyDb() - proc isInState(idx: int, state: string): Future[bool] {.async.} = + proc isInState(idx: int, state: string): bool = proc description(state: State): string = $state - check eventually sales.agents.len > idx + + if idx >= sales.agents.len: + return false sales.agents[idx].query(description) == state.some proc allowRequestToStart {.async.} = - check eventually (await isInState(0, "SaleInitialProving")) + check eventually isInState(0, "SaleInitialProving") # it won't start proving until the next period await clock.advanceToNextPeriod(market)