test_client: simple sleep to try avoid macos CI test failures (#2707)

This commit is contained in:
Ivan FB 2024-05-16 18:04:04 +02:00 committed by GitHub
parent 5b1fbb26c4
commit f0f94412a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 14 deletions

View File

@ -74,13 +74,16 @@ suite "Store Client":
await allFutures(serverSwitch.start(), clientSwitch.start())
if serverSwitch.peerInfo.isNil():
error "serverSwitch.peerInfo is nil"
raise newException(CatchableError, "serverSwitch.peerInfo is nil")
if clientSwitch.peerInfo.isNil():
error "clientSwitch.peerInfo is nil"
raise newException(CatchableError, "clientSwitch.peerInfo is nil")
## The following sleep is aimed to prevent macos failures in CI
#[
2024-05-16T13:24:45.5106200Z INF 2024-05-16 13:24:45.509+00:00 Stopping AutonatService topics="libp2p autonatservice" tid=53712 file=service.nim:203
2024-05-16T13:24:45.5107960Z WRN 2024-05-16 13:24:45.509+00:00 service is already stopped topics="libp2p switch" tid=53712 file=switch.nim:86
2024-05-16T13:24:45.5109010Z . (1.68s)
2024-05-16T13:24:45.5109320Z Store Client (0.00s)
2024-05-16T13:24:45.5109870Z SIGSEGV: Illegal storage access. (Attempt to read from nil?)
2024-05-16T13:24:45.5111470Z stack trace: (most recent call last)
]#
await sleepAsync(500.millis)
serverPeerInfo = serverSwitch.peerInfo.toRemotePeerInfo()
clientPeerInfo = clientSwitch.peerInfo.toRemotePeerInfo()

View File

@ -54,13 +54,16 @@ suite "Store Client":
await allFutures(serverSwitch.start(), clientSwitch.start())
if serverSwitch.peerInfo.isNil():
error "serverSwitch.peerInfo is nil"
raise newException(CatchableError, "serverSwitch.peerInfo is nil")
if clientSwitch.peerInfo.isNil():
error "clientSwitch.peerInfo is nil"
raise newException(CatchableError, "clientSwitch.peerInfo is nil")
## The following sleep is aimed to prevent macos failures in CI
#[
2024-05-16T13:24:45.5106200Z INF 2024-05-16 13:24:45.509+00:00 Stopping AutonatService topics="libp2p autonatservice" tid=53712 file=service.nim:203
2024-05-16T13:24:45.5107960Z WRN 2024-05-16 13:24:45.509+00:00 service is already stopped topics="libp2p switch" tid=53712 file=switch.nim:86
2024-05-16T13:24:45.5109010Z . (1.68s)
2024-05-16T13:24:45.5109320Z Store Client (0.00s)
2024-05-16T13:24:45.5109870Z SIGSEGV: Illegal storage access. (Attempt to read from nil?)
2024-05-16T13:24:45.5111470Z stack trace: (most recent call last)
]#
await sleepAsync(500.millis)
serverPeerInfo = serverSwitch.peerInfo.toRemotePeerInfo()
clientPeerInfo = clientSwitch.peerInfo.toRemotePeerInfo()