Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/all_tests.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ when not defined(i386):
import
./test_blockchain_dag,
./test_keystore,
./test_keystore_management,
./test_keymanager_api
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flaky tests are test_keymanager_api and test_signing_node. test_keystore_management is mostly doing file I/O and test_keystore is mostly about the serialization and cryptography and these have been running smoothly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zah, let's please prioritize fixing the tests then. Flaky CI is super time consuming for everyone (not just the maintainers of these flaky tests); the tests should be disabled in CI until they are capable of running reliably. When they run reliably again, just add them back to run on CI.

./test_keystore_management

when not defined(windows):
import ./test_keymanager_api

summarizeLongTests("AllTests")
34 changes: 19 additions & 15 deletions tests/test_light_client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,25 @@ suite "Light client" & preset():
store.migrateToDataFork(lcDataFork)
withForkyStore(store):
when lcDataFork > LightClientDataFork.None:
bootstrap.migrateToDataFork(lcDataFork)
template forkyBootstrap: untyped = bootstrap.forky(lcDataFork)
let upgradedUpdate = update.migratingToDataFork(lcDataFork)
template forkyUpdate: untyped = upgradedUpdate.forky(lcDataFork)
let res = process_light_client_update(
forkyStore, forkyUpdate, currentSlot, cfg, genesis_validators_root)
check:
forkyUpdate.finalized_header.beacon.slot.sync_committee_period ==
period
res.isOk
if forkyUpdate.finalized_header.beacon.slot >
forkyBootstrap.header.beacon.slot:
forkyStore.finalized_header == forkyUpdate.finalized_header
else:
forkyStore.finalized_header == forkyBootstrap.header
# Reduce stack size by making this a `proc`
proc syncToPeriod() =
bootstrap.migrateToDataFork(lcDataFork)
template forkyBootstrap: untyped = bootstrap.forky(lcDataFork)
let upgradedUpdate = update.migratingToDataFork(lcDataFork)
template forkyUpdate: untyped = upgradedUpdate.forky(lcDataFork)
let res = process_light_client_update(
forkyStore, forkyUpdate, currentSlot, cfg,
genesis_validators_root)
check:
forkyUpdate.finalized_header.beacon.slot.sync_committee_period ==
period
res.isOk
if forkyUpdate.finalized_header.beacon.slot >
forkyBootstrap.header.beacon.slot:
forkyStore.finalized_header == forkyUpdate.finalized_header
else:
forkyStore.finalized_header == forkyBootstrap.header
syncToPeriod()
inc numIterations
if numIterations > 20: doAssert false # Avoid endless loop on test failure

Expand Down