rename event in test

This commit is contained in:
NagyZoltanPeter 2026-06-19 12:51:00 +02:00
parent 15c4e3b918
commit 47f3194dfd
No known key found for this signature in database
GPG Key ID: 3E1F97CF4A7B6F42

View File

@ -67,20 +67,20 @@ proc waitForConnectionStatus(
## Completes when the node reports `expected`.
var future = newFuture[void]("waitForConnectionStatus")
let handler: EventConnectionStatusChangeListenerProc = proc(
e: EventConnectionStatusChange
let handler: health_events.ConnectionStatusChangeEventListenerProc = proc(
e: health_events.ConnectionStatusChangeEvent
) {.async: (raises: []), gcsafe.} =
if not future.finished and e.connectionStatus == expected:
future.complete()
let handle = EventConnectionStatusChange.listen(brokerCtx, handler).valueOr:
let handle = health_events.ConnectionStatusChangeEvent.listen(brokerCtx, handler).valueOr:
raiseAssert error
try:
if not await future.withTimeout(TestTimeout):
raiseAssert "Timeout waiting for status: " & $expected
finally:
await EventConnectionStatusChange.dropListener(brokerCtx, handle)
await health_events.ConnectionStatusChangeEvent.dropListener(brokerCtx, handle)
proc createApiNodeConf(numShards: uint16 = 1): WakuNodeConf =
var conf = defaultWakuNodeConf().valueOr: