Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF: Fix LIB advancement detection in IF transition tests #2269

Closed
wants to merge 3 commits into from

Conversation

linh2931
Copy link
Member

Occasionally votes_greater_than_threshold_test fails in CICD. The issue was votes are signed asynchronously and they could be delayed. The test only waited for 4 blocks to decide whether LIB had advanced. On a busy test machine, this could be insufficient.

  • Increased the number of blocks waited for LIB advancing to 50.
  • Moved finality transition related tests from api_tests.cpp to finality_transition_tests.cpp.

Resolved #2267

@ericpassmore
Copy link
Contributor

ericpassmore commented Feb 28, 2024

Note:start
group: IF
category: CLOSED
summary: Closed. Changes to ensure enough asynchronous votes are received to advance LIB in tests.
Note:end

BOOST_REQUIRE(ext);

// Local votes are signed asychronously. They can be delayed.
// Leave room for the delay.
Copy link
Member

Choose a reason for hiding this comment

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

Seems to me we need something like wait_for_vote or ability to run controller in test mode where it votes synchronously.

Copy link
Member Author

@linh2931 linh2931 Feb 29, 2024

Choose a reason for hiding this comment

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

I thought about using conditional variable to wait. That amounts to the same we are doing now -- checking LIB in a loop and and breaking if it advances. If using controller to vote synchronously, that does not test the actual voting. Tests in finality_tests.cpp vote synchronously.
I think if after a large number of blocks LIB still does not advance, something must be wrong; tests here can catch that.

@arhag
Copy link
Member

arhag commented Mar 6, 2024

Closing since the proper solution is tracked by #2289.

@arhag arhag closed this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IF: Test failure: api_unit_test_eos-vm-jit/votes_greater_than_threshold_test
4 participants