Proto/tests: rework "activate_ai"
Depends on !12322 (merged)
What
activate_ai is a bit weak, so let's make it better. Also some other small improvements
Why
There are multiple ways to activate AI. Arguably they should more or less all be interchangeable (depending on the situation), but most importantly it should be more explicit in the tests to see what the function [activate_ai] actually does. There are 4 modes that activates AI, and one that deactivates it. By choosing the correct one in the test, it will improve readability and future proof it. For instance, there is no reason to wait for a couple of cycles for AI to be activated in tests that only focus on stake/unstake operations, so the change was made there to activate_ai by Force (using the correct flag) in those tests, which reduces unnecessary runtime.
How
Manually testing the MR
You know the drill:
dune exec src/proto_alpha/lib_protocol/test/integration/main.exe -- --match "test_scenario.*\.ml" -j 4 -k
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR