nanocurrency / nano-node

Nano is digital currency. Its ticker is: XNO and its currency symbol is: Ӿ
https://nano.org
BSD 3-Clause "New" or "Revised" License
3.48k stars 786 forks source link

Unit test node.local_votes_cache_batch failed in CI #3481

Open dsiganos opened 2 years ago

dsiganos commented 2 years ago
[ RUN      ] node.local_votes_cache_batch
/Users/runner/work/nano-node/nano-node/nano/core_test/node.cpp:2774: Failure
Value of: node.history.votes (receive1->root (), receive1->hash ()).empty ()
  Actual: true
Expected: false
[  FAILED  ] node.local_votes_cache_batch (1338 ms)

https://github.com/nanocurrency/nano-node/runs/3731928529?check_suite_focus=true

thsfs commented 2 years ago

Disabled by PR: https://github.com/nanocurrency/nano-node/pull/3532

thsfs commented 2 years ago

This failure seems to occur because the max_delay value in request_aggregator is just 50ms. Tried to increase this number to 600ms (double of the value used for live network), but this is still not sufficient if the CPU load of the CI machine is too high.

This is reproducible by using commands like stress -m 40 to simulate the CPU load and also nice -n 19 ./core_test --gtest_repeat=50... to reduce the test process priority.

Suggest moving this test to another class of tests rather than core_test, that won't run in the CI.